pidunu icon indicating copy to clipboard operation
pidunu copied to clipboard

Added all signals, exit with child exit code, reap all remaining pid's

Open bartmeuris opened this issue 9 years ago • 1 comments

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);

bartmeuris avatar Apr 20 '15 10:04 bartmeuris

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.

rciorba avatar Apr 20 '15 12:04 rciorba