Files
docker-cli/components/engine/docs/reference/commandline
Michael Crosby 8ee0f56810 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>
Upstream-commit: ee3ac3aa66bfb27b7c21dfb253fdaa113baedd4e
Component: engine
2016-09-19 17:33:50 -07:00
..
2016-09-02 11:46:49 +08:00
2016-07-07 20:43:18 +02:00
2016-09-15 16:09:24 +02:00
2016-07-22 10:38:56 +02:00
2016-07-07 20:43:18 +02:00
2015-06-15 13:19:38 -07:00
2016-09-15 09:55:29 +00:00
2016-09-12 19:10:45 +08:00
2016-09-18 11:00:19 +08:00
2016-09-12 19:10:45 +08:00
2016-07-31 00:06:18 +08:00
2016-07-07 20:43:18 +02:00
2016-09-05 04:44:18 +00:00
2016-09-16 15:29:28 +02:00
2016-08-01 18:55:58 -07:00
2016-08-31 14:18:41 +08:00
2016-07-07 20:43:18 +02:00
2016-07-07 20:43:18 +02:00
2016-09-18 11:00:19 +08:00
2016-09-01 14:48:02 +08:00
2016-08-30 23:07:42 +08:00
2016-07-07 20:43:18 +02:00
2016-07-07 20:43:18 +02:00
2016-09-19 12:12:54 +02:00
2016-07-07 20:43:18 +02:00
2016-09-19 12:12:54 +02:00
2016-09-16 11:56:15 -07:00
2016-07-07 20:43:18 +02:00
2016-07-07 20:43:18 +02:00
2016-07-07 20:43:18 +02:00
2016-09-18 11:00:19 +08:00
2016-08-30 23:07:42 +08:00