Skip to content

Exec bspwmrc before setting up signal handlers. #1479

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

Closed
wants to merge 1 commit into from

Conversation

falsifian
Copy link

Before this change, it seems everything I launch via bspwm ignored SIGPIPE, which is unexpected.

I have not thoroughly tested this change. I'm currently using bspwm with the change applied and will comment if I run into any trouble.

For example, if I ran find / | : (in an xterm launched via sxhkdrc which was launched from bspwmrc) then that command would hang until find finished; normally, with SIGPIPE having its default effect of terminating the process, find / | : should end right away because find dies.

@falsifian
Copy link
Author

Thinking about it more, maybe it would be better to call at least signal(SIGCHLD, sig_handler) before run_config. My knowledge is pretty sketchy, but I guess without that handler there's a small chance of leaving a zombie if bspwmrc terminates quickly. If I'm understanding right, only SIG_IGN survives the execl call in run_config, so signal(SIGPIPE, SIG_IGN) is the only one that actually needs to be moved to after run_config.

@falsifian
Copy link
Author

Please see this one instead: #1480

@falsifian falsifian closed this Jan 12, 2024
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.

1 participant