1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/daemon
Michael Crosby ee3ac3aa66 Add init process for zombie fighting
This adds a small C binary for fighting zombies.  It is mounted under
`/dev/init` and is prepended to the args specified by the user.  You
enable it via a daemon flag, `dockerd --init`, as it is disable by
default for backwards compat.

You can also override the daemon option or specify this on a per
container basis with `docker run --init=true|false`.

You can test this by running a process like this as the pid 1 in a
container and see the extra zombie that appears in the container as it
is running.

```c

int main(int argc, char ** argv) {
	pid_t pid = fork();
	if (pid == 0) {
		pid = fork();
		if (pid == 0) {
			exit(0);
		}
		sleep(3);
		exit(0);
	}
	printf("got pid %d and exited\n", pid);
	sleep(20);
}
```

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-09-19 17:33:50 -07:00
..
caps
cluster Merge pull request #26606 from dnephin/move_errors 2016-09-17 16:00:38 +02:00
events test: fix trivial code convention noncompliance 2016-09-12 07:36:52 +00:00
exec Add TERM env var to exec 2016-09-12 09:20:27 -07:00
graphdriver Windows: Remove TP5 hack from graphdriver 2016-09-17 16:16:50 -07:00
links
logger Merge pull request #26207 from splunk/splunk-logging-driver-performance-improvements 2016-09-16 10:22:09 -07:00
network Fix autostart for swarm scope connected containers 2016-09-13 14:21:58 -07:00
apparmor_default.go
apparmor_default_unsupported.go
archive.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00
archive_unix.go Windows: docker cp consistent paths 2016-05-06 16:08:53 -07:00
archive_windows.go Windows: Remove TP4 support from main code 2016-04-06 12:12:20 -07:00
attach.go Move errors/ to api/errors 2016-09-16 12:27:13 -04:00
auth.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00
changes.go Move some container related methods and structs to smaller files 2016-05-24 21:31:15 +02:00
checkpoint.go Initial implementation of containerd Checkpoint API. 2016-09-08 21:31:52 -04:00
commit.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00
config.go Remove old cli framework. 2016-08-25 13:09:04 -04:00
config_experimental.go Convert dockerd to use cobra and pflag 2016-08-25 13:09:03 -04:00
config_solaris.go Convert dockerd to use cobra and pflag 2016-08-25 13:09:03 -04:00
config_stub.go Convert dockerd to use cobra and pflag 2016-08-25 13:09:03 -04:00
config_test.go Update unit tests for new cobra root command. 2016-08-25 13:09:04 -04:00
config_unix.go Add init process for zombie fighting 2016-09-19 17:33:50 -07:00
config_windows.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00
container.go Move errors/ to api/errors 2016-09-16 12:27:13 -04:00
container_operations.go Move errors/ to api/errors 2016-09-16 12:27:13 -04:00
container_operations_solaris.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00
container_operations_unix.go Add support for docker run in swarm mode overlay 2016-09-07 21:20:41 -07:00
container_operations_windows.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00
create.go Move errors/ to api/errors 2016-09-16 12:27:13 -04:00
create_unix.go Add new HostConfig field, Mounts. 2016-09-13 09:55:35 -04:00
create_windows.go Add new HostConfig field, Mounts. 2016-09-13 09:55:35 -04:00
daemon.go Merge pull request #26449 from mrjana/net 2016-09-13 18:22:16 -07:00
daemon_experimental.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00
daemon_linux.go Fix container mount cleanup issues 2016-03-30 17:25:49 -07:00
daemon_linux_test.go Fix container mount cleanup issues 2016-03-30 17:25:49 -07:00
daemon_solaris.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00
daemon_stub.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00
daemon_test.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00
daemon_unix.go Remove --read-only restriction when user ns enabled 2016-09-09 13:23:41 -04:00
daemon_unix_test.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00
daemon_unsupported.go Get the Docker Engine to build clean on Solaris 2016-05-23 16:37:12 -07:00
daemon_windows.go Merge pull request #25737 from Microsoft/jjh-statistics 2016-09-17 09:31:24 -07:00
debugtrap_unix.go Windows: Stack dump to file 2016-07-21 20:04:47 -07:00
debugtrap_unsupported.go Windows: Stack dump to file 2016-07-21 20:04:47 -07:00
debugtrap_windows.go Windows: Stack dump to file 2016-07-21 20:04:47 -07:00
delete.go Move errors/ to api/errors 2016-09-16 12:27:13 -04:00
delete_test.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00
discovery.go validate heartbeat in discovery cluster opts 2016-09-01 01:07:05 +08:00
discovery_test.go validate heartbeat in discovery cluster opts 2016-09-01 01:07:05 +08:00
errors.go Move errors/ to api/errors 2016-09-16 12:27:13 -04:00
events.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00
events_test.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00
exec.go Move errors/ to api/errors 2016-09-16 12:27:13 -04:00
exec_linux.go
exec_solaris.go Get the Docker Engine to build clean on Solaris 2016-05-23 16:37:12 -07:00
exec_windows.go Windows: escape entrypoint before passing to libcontainerd 2016-03-30 12:59:50 -07:00
export.go
health.go Prevent stdout / stderr race condition in limitedBuffer. 2016-09-15 13:31:11 +02:00
health_test.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00
image.go Generalize content addressable and reference storage 2016-09-15 18:08:19 -07:00
image_delete.go Merge pull request #26616 from tonistiigi/id-digest 2016-09-18 09:40:16 -04:00
image_exporter.go Move some image related methods & struct to smaller files 2016-05-21 22:36:11 +02:00
image_history.go Generalize content addressable and reference storage 2016-09-15 18:08:19 -07:00
image_inspect.go Generalize content addressable and reference storage 2016-09-15 18:08:19 -07:00
image_pull.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00
image_push.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00
image_tag.go Generalize content addressable and reference storage 2016-09-15 18:08:19 -07:00
images.go Generalize content addressable and reference storage 2016-09-15 18:08:19 -07:00
import.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00
info.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00
inspect.go Merge pull request #26405 from yongtang/26326-inspect-ulimit-with-daemon-default 2016-09-08 13:21:26 -04:00
inspect_solaris.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00
inspect_unix.go Add new HostConfig field, Mounts. 2016-09-13 09:55:35 -04:00
inspect_windows.go Add new HostConfig field, Mounts. 2016-09-13 09:55:35 -04:00
keys.go Change root_maxkeys 2016-06-27 10:23:37 -07:00
keys_unsupported.go Change root_maxkeys 2016-06-27 10:23:37 -07:00
kill.go make container kill debug log readable 2016-08-01 01:00:38 +08:00
links.go
links_test.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00
list.go Add support for docker run in swarm mode overlay 2016-09-07 21:20:41 -07:00
list_unix.go Get the Docker Engine to build clean on Solaris 2016-05-23 16:37:12 -07:00
list_windows.go
logdrivers_linux.go
logdrivers_windows.go Enable syslog driver for windows 2016-08-17 22:26:24 +02:00
logs.go Move engine-api client package 2016-09-07 11:05:58 -07:00
logs_test.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00
monitor.go Windows: OCI remove first start 2016-09-16 16:05:55 -07:00
monitor_linux.go Adding postRunProcessing infrastructure for hanlding Windows Update. 2016-04-06 14:03:05 -07:00
monitor_solaris.go Get the Docker Engine to build clean on Solaris 2016-05-23 16:37:12 -07:00
monitor_windows.go Initial implementation of containerd Checkpoint API. 2016-09-08 21:31:52 -04:00
mounts.go Add new HostConfig field, Mounts. 2016-09-13 09:55:35 -04:00
names.go Added the word "container" to clarify the error message. 2016-08-22 13:41:17 -07:00
network.go Move errors/ to api/errors 2016-09-16 12:27:13 -04:00
oci_linux.go Add init process for zombie fighting 2016-09-19 17:33:50 -07:00
oci_solaris.go Fix ulimits in docker inspect when daemon default exists 2016-09-07 23:15:22 -07:00
oci_windows.go Merge pull request #26579 from Microsoft/jjh/ociprocess 2016-09-19 22:52:16 +02:00
pause.go
rename.go Fix docker rename with linked containers 2016-06-27 19:58:05 -07:00
resize.go
restart.go Initial implementation of containerd Checkpoint API. 2016-09-08 21:31:52 -04:00
search.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00
search_test.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00
seccomp_disabled.go Replace old oci specs import with runtime-specs 2016-08-17 09:38:34 -07:00
seccomp_linux.go New seccomp format 2016-09-01 11:53:07 +02:00
seccomp_unsupported.go Fix seccomp output in docker info 2016-07-08 17:26:42 -07:00
selinux_linux.go
selinux_unsupported.go
start.go Move errors/ to api/errors 2016-09-16 12:27:13 -04:00
start_linux.go daemon: ensure systemd cgroup is passed down to runtimes 2016-08-26 15:33:26 +02:00
start_windows.go Windows: OCI remove first start 2016-09-16 16:05:55 -07:00
stats.go Windows: stats support 2016-09-16 11:56:15 -07:00
stats_collector.go Windows: stats support 2016-09-16 11:56:15 -07:00
stats_collector_solaris.go Get the Docker Engine to build clean on Solaris 2016-05-23 16:37:12 -07:00
stats_collector_unix.go Windows: stats support 2016-09-16 11:56:15 -07:00
stats_collector_windows.go Windows: stats support 2016-09-16 11:56:15 -07:00
stats_unix.go Windows: stats support 2016-09-16 11:56:15 -07:00
stats_windows.go Windows: stats support 2016-09-16 11:56:15 -07:00
stop.go Move errors/ to api/errors 2016-09-16 12:27:13 -04:00
top_unix.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00
top_unix_test.go Validate arguments for ps in docker top 2016-07-08 05:58:11 +00:00
top_windows.go Windows: docker top implementation 2016-09-07 16:29:02 -07:00
unpause.go remove running judgement when unpause container 2016-08-29 10:16:18 +08:00
update.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00
update_linux.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00
update_solaris.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00
update_windows.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00
volumes.go Merge pull request #26656 from miaoyq/rename-name-to-destination 2016-09-17 16:01:02 +02:00
volumes_unit_test.go
volumes_unix.go Add new HostConfig field, Mounts. 2016-09-13 09:55:35 -04:00
volumes_windows.go Add new HostConfig field, Mounts. 2016-09-13 09:55:35 -04:00
wait.go Fix race on force deleting container created by task 2016-06-14 16:49:04 -07:00