diff options
| author | Michael Crosby <crosbymichael@gmail.com> | 2016-06-27 14:38:47 -0700 |
|---|---|---|
| committer | Michael Crosby <crosbymichael@gmail.com> | 2016-09-19 17:33:50 -0700 |
| commit | ee3ac3aa66bfb27b7c21dfb253fdaa113baedd4e (patch) | |
| tree | 6f4bcf7adb5a6c3e103350a5f7dc7df88db4f478 /hack/make/binary-daemon | |
| parent | d8c9951707b1a893518888e04ac1bfd80e26f19d (diff) | |
| download | docker-ee3ac3aa66bfb27b7c21dfb253fdaa113baedd4e.tar.gz | |
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>
Diffstat (limited to 'hack/make/binary-daemon')
| -rw-r--r-- | hack/make/binary-daemon | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hack/make/binary-daemon b/hack/make/binary-daemon index e75c44c587..7ce47a2047 100644 --- a/hack/make/binary-daemon +++ b/hack/make/binary-daemon @@ -12,5 +12,5 @@ set -e export BINARY_SHORT_NAME="$DOCKER_PROXY_BINARY_NAME" export SOURCE_PATH='./vendor/src/github.com/docker/libnetwork/cmd/proxy' source "${MAKEDIR}/.binary" - copy_containerd "$DEST" 'hash' + copy_binaries "$DEST" 'hash' ) |
