mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
ee3ac3aa66
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> |
||
---|---|---|
.. | ||
.build-deb | ||
.build-rpm | ||
.resources-windows | ||
.binary | ||
.binary-setup | ||
.detect-daemon-osarch | ||
.ensure-emptyfs | ||
.go-autogen | ||
.integration-daemon-setup | ||
.integration-daemon-start | ||
.integration-daemon-stop | ||
.integration-test-helpers | ||
.validate | ||
binary | ||
binary-client | ||
binary-daemon | ||
build-deb | ||
build-integration-test-binary | ||
build-rpm | ||
clean-apt-repo | ||
clean-yum-repo | ||
cover | ||
cross | ||
dynbinary | ||
dynbinary-client | ||
dynbinary-daemon | ||
generate-index-listing | ||
install-binary | ||
install-binary-client | ||
install-binary-daemon | ||
install-script | ||
README.md | ||
release-deb | ||
release-rpm | ||
run | ||
sign-repos | ||
test-deb-install | ||
test-docker-py | ||
test-install-script | ||
test-integration-cli | ||
test-integration-shell | ||
test-old-apt-repo | ||
test-unit | ||
tgz | ||
ubuntu | ||
update-apt-repo | ||
validate-dco | ||
validate-default-seccomp | ||
validate-gofmt | ||
validate-lint | ||
validate-pkg | ||
validate-test | ||
validate-toml | ||
validate-vendor | ||
validate-vet | ||
win |
This directory holds scripts called by make.sh
in the parent directory.
Each script is named after the bundle it creates. They should not be called directly - instead, pass it as argument to make.sh, for example:
./hack/make.sh test
./hack/make.sh binary ubuntu
# Or to run all bundles:
./hack/make.sh
To add a bundle:
- Create a shell-compatible file here
- Add it to $DEFAULT_BUNDLES in make.sh