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

restore SIGCHLD settings to SIG_DFL. #600 #636

Merged
merged 1 commit into from
Mar 29, 2020

Conversation

masm11
Copy link
Contributor

@masm11 masm11 commented Mar 27, 2020

I startup "Terminator", a terminal emulator, from Waybar button.

Waybar forks on button click, and the child process executes Terminator,
and the Waybar process itself setups SIGCHLD to SIG_IGN to discard defunct child processes.
But the SIGCHLD setting is inherited to a new child process on fork when I click the button next time.

That is why Terminator startups with SIGCHLD setting of SIG_IGN on the second click.

Terminator forks, executes uname -p, and waits finishing of the uname -p process.
But because Terminator's SIGCHLD setting is SIG_IGN, uname -p process disappears just after it exits,
and Terminator can't wait it, raise an exeception, and exits.

The solution is to restore SIGCHLD setting of child processes to SIG_DFL after forks.
Then, Terminator's SIGCHLD setting becomes SIG_DFL, and uname -p process doesn't disappears until
Terminator waits.

@masm11 masm11 changed the title restore SIGCHLD settings to SIG_DFL. restore SIGCHLD settings to SIG_DFL. #600 Mar 27, 2020
@Alexays
Copy link
Owner

Alexays commented Mar 29, 2020

Thanks!

@Alexays Alexays merged commit ae3d4b9 into Alexays:master Mar 29, 2020
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.

None yet

2 participants