moby--moby/hack
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
..
Jenkins Update win2lin scripts to match production 2016-06-08 11:08:23 -07:00
make Add init process for zombie fighting 2016-09-19 17:33:50 -07:00
.vendor-helpers.sh hack/vendor.sh: remove old hacks for etcd 2016-08-12 08:50:52 -07:00
dind Update dind 2016-05-24 20:42:28 -07:00
generate-authors.sh
install.sh Remove systemd drop-in file on raspbian 2016-09-01 23:18:05 +02:00
make.sh Add init process for zombie fighting 2016-09-19 17:33:50 -07:00
release.sh Update release script installation instructions 2016-06-16 11:58:29 -07:00
vendor.sh re-vendor syslog package 2016-09-17 10:25:05 -04:00