Skip to content

Conversation

@minijackson
Copy link

Allows the process parent of procServ to check if the child was terminated abnormally.

Fixes #58.

Allows the process parent of procServ to check if the child was
terminated abnormally.
// In order to exit as if we were killed, by returning e.g. 137 if
// killed by SIGKILL.
// See: https://tldp.org/LDP/abs/html/exitcodes.html
childExitCode = 128 + WTERMSIG(wstatus);
Copy link
Contributor

Choose a reason for hiding this comment

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

Would childExitCode = wstatus be more portable?

I think the four WIF*() bits are mutually exclusive, so WIFSIGNALED() tests as true, then the others should be false.

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.

Should procServ exit >0 when the process is terminated by a signal?

2 participants