pidunu
pidunu copied to clipboard
Added all signals, exit with child exit code, reap all remaining pid's
This pull request contains the following changes:
- added all signals mentioned in the
docker/pkg/signal/signal_linux.go
file (with the exception of SIGKILL and SIGSTOP), which should now be passed to the child process. - After the child process exits, I loop over the
waitpid(-1, NULL, WNOHANG)
to avoid child processes of your child process not being reaped. - return the child processes' exit code by returning
WEXITSTATUS(cstatus);
Thanks for sending this! I added some comments inline.
Also, could you create a CONTRIBUTORS.txt and add your name to it? Something along the lines of: Author Name - Handling of return code and proper signal handling.