DockerCLI/docs/reference
Michael Crosby d72deed554 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>
2017-06-02 00:10:10 +00:00
..
commandline Add init process for zombie fighting 2017-06-02 00:10:10 +00:00
builder.md Update ENTRYPOINT/CMD table to agree with docs 2017-06-02 00:10:09 +00:00
glossary.md add swarm mode terms to the glossary 2017-06-02 00:10:09 +00:00
index.md Creating Engine specific menu 2017-06-02 00:07:26 +00:00
run.md Remove extra paren in `run --link` docs 2017-06-02 00:10:10 +00:00