Skip to content

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

Open
bartmeuris wants to merge 1 commit intorciorba:masterfrom
bartmeuris:master
Open

Added all signals, exit with child exit code, reap all remaining pid's#1
bartmeuris wants to merge 1 commit intorciorba:masterfrom
bartmeuris:master

Conversation

@bartmeuris
Copy link

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

@rciorba
Copy link
Owner

rciorba commented Apr 20, 2015

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.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The python tests make assertions based on these messages. If you want to update this message you should update the tests as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants