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

main: ignore SIGPIPE globally. #2096

Merged
merged 1 commit into from
Jan 15, 2024
Merged

Conversation

lcolitti
Copy link
Contributor

By default, writing to a pipe that has been closed terminates the program with SIGPIPE. Ignoring SIGPIPE results in the syscall failing with EPIPE instead.

This generally prevents crashing on IPCs. One crash I found is in write_selection_property_to_wl_client when using xpra to run remote apps. If xpra updates the selection too often, wayfire crashes with SIGPIPE. But this probably prevents other crashes in general. It also matches what other compositors do, e.g., sway also globally ignores SIGPIPE to prevent crashes caused by IPCs.

By default, writing to a pipe that has been closed terminates the
program with SIGPIPE. Ignoring SIGPIPE results in the syscall
failing with EPIPE instead.

This generally prevents crashing on IPCs. One crash I found is in
write_selection_property_to_wl_client when using xpra to run
remote apps. If xpra updates the selection too often, wayfire
crashes with SIGPIPE. But this probably prevents other crashes in
general. It also matches what other compositors do, e.g., sway
also globally ignores SIGPIPE to prevent crashes caused by IPCs.
@ammen99
Copy link
Member

ammen99 commented Jan 15, 2024

Thanks!

@ammen99 ammen99 merged commit 1ecf72a into WayfireWM:master Jan 15, 2024
4 checks passed
lilydjwg pushed a commit to lilydjwg/wayfire that referenced this pull request Jan 21, 2024
By default, writing to a pipe that has been closed terminates the
program with SIGPIPE. Ignoring SIGPIPE results in the syscall
failing with EPIPE instead.

This generally prevents crashing on IPCs. One crash I found is in
write_selection_property_to_wl_client when using xpra to run
remote apps. If xpra updates the selection too often, wayfire
crashes with SIGPIPE. But this probably prevents other crashes in
general. It also matches what other compositors do, e.g., sway
also globally ignores SIGPIPE to prevent crashes caused by IPCs.
ammen99 pushed a commit that referenced this pull request Mar 13, 2024
By default, writing to a pipe that has been closed terminates the
program with SIGPIPE. Ignoring SIGPIPE results in the syscall
failing with EPIPE instead.

This generally prevents crashing on IPCs. One crash I found is in
write_selection_property_to_wl_client when using xpra to run
remote apps. If xpra updates the selection too often, wayfire
crashes with SIGPIPE. But this probably prevents other crashes in
general. It also matches what other compositors do, e.g., sway
also globally ignores SIGPIPE to prevent crashes caused by IPCs.
@lcolitti lcolitti deleted the ignore-sigpipe branch April 3, 2024 13:19
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.

2 participants