1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/runconfig/opts
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
..
fixtures Move the runconfig.Parse() function into the runconfig/opts package. 2016-01-04 12:06:29 -05:00
envfile.go Move some validators from opts to runconfig/opts. 2016-01-04 14:35:36 -05:00
envfile_test.go fix typos 2016-06-02 17:17:22 +08:00
opts.go Add init process for zombie fighting 2016-09-19 17:33:50 -07:00
opts_test.go validate build-arg 2016-09-12 18:02:21 +08:00
parse.go Add init process for zombie fighting 2016-09-19 17:33:50 -07:00
parse_test.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00
runtime.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00
throttledevice.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00
ulimit.go Convert 'docker run' to a cobra command and to use pflags 2016-06-04 13:55:35 +02:00
ulimit_test.go Move ulimit options to runconfig opts 2015-12-23 13:27:58 -05:00
weightdevice.go Add engine-api types to docker 2016-09-07 11:05:58 -07:00