Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

child process cannot be terminated with SIGTERM #48

Open
dirk-zimoch opened this issue Apr 15, 2021 · 5 comments
Open

child process cannot be terminated with SIGTERM #48

dirk-zimoch opened this issue Apr 15, 2021 · 5 comments

Comments

@dirk-zimoch
Copy link
Contributor

Since V6.6.1, to be exact since commit 291c7a0 "Make signal handling safe using pselect.", the child process started by procServ cannot be terminated with SIGTERM any longer. In particular --killsig 15 does not work.

The reason is probably that the child inherits the signal mask which blocks SIGTERM (and SIGPIPE and SIGHUP).

Signal mask should be reset to "normal" for the child.

@ralphlange
Copy link
Owner

+1

@dirk-zimoch
Copy link
Contributor Author

man sigprocmask:

A child created via fork(2) inherits a copy of its parent's signal mask; the signal mask is preserved across execve(2).

@dirk-zimoch
Copy link
Contributor Author

Argh, only half the job...
Need to handle SIG_IGN as well.

@dirk-zimoch
Copy link
Contributor Author

I replaced ignoring signals by blocking signals so that signals can be restored easier in the child process.

@dirk-zimoch
Copy link
Contributor Author

Should I put the fix for the annoying SigPipe message #43 into this branch, too?

I would also like to clean up spaces and tabs.

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

No branches or pull requests

2 participants