restore original procmask for child process - #50
Open
dirk-zimoch wants to merge 2 commits into
Open
Conversation
dirk-zimoch
commented
Apr 15, 2021
| sigaction(SIGINT, &sig, NULL); | ||
| sig.sa_handler = SIG_IGN; | ||
| sigaction(SIGQUIT, &sig, NULL); | ||
| } |
Contributor
Author
There was a problem hiding this comment.
Is this correct? Ignore CTRL-C when running in the foreground?
Open
Contributor
Author
|
I rather have #52 than this one merged. |
ericonr
approved these changes
Nov 13, 2024
ericonr
left a comment
There was a problem hiding this comment.
This review of course applies to any PR with these two commits.
Perhaps merging this one first and then the other ones might be easier?
|
|
||
| // processFactory creates the process that we are managing | ||
| connectionItem * processFactory(char *exe, char *argv[]); | ||
| connectionItem * processFactory(char *exe, char *argv[], sigset_t *sigset); |
Comment on lines
+18
to
+22
| friend connectionItem * processFactory(char *exe, char *argv[], sigset_t *sigset); | ||
| friend bool processFactoryNeedsRestart(); | ||
| friend void processFactorySendSignal(int signal); | ||
| public: | ||
| processClass(char *exe, char *argv[]); | ||
| processClass(char *exe, char *argv[], sigset_t *sigset); |
Comment on lines
+497
to
+501
| sigaddset(&sigset_block, SIGXFSZ); | ||
| if (inFgMode) { | ||
| sigaddset(&sigset_block, SIGINT); | ||
| sigaddset(&sigset_block, SIGQUIT); | ||
| } |
There was a problem hiding this comment.
This unblocks some more signals from the child, because the SIG_IGN disposition used in sigaction previously would still apply to the child processes, even if the sigmask was restored.
Would be nice if the commit message called out that nuance.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix for issue #48.