-
Notifications
You must be signed in to change notification settings - Fork 273
Reset SIGCHLD action to SIG_DFL #711
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
Conversation
bef0c08 to
23d9ad3
Compare
|
This bug is also affecting running volumeicon with the new glycin based loader for gdk-pixbuf. Without the patch, bwrap hangs in monitor_child, and starts up correctly with. |
|
This seems more like a workaround than a solution: applications can't just assume that every subprocess that they might run can cope with functionally-significant signals being blocked. |
Some applications like Erlang sets SIGCHLD to SIG_IGN because "recognized" children process are fork'ed using a helper child process, but this issue is related to an "unrecognized" child process started by an external library of an plugin, in this example is because Erlang has a wxWidgets graphical wrapper that uses GTK and it uses glycin for image loading. I think that if an program has to manage children processes it must set the necessary signal settings for work properly. |
Sure, but this reasoning applies equally to Erlang: it can't just break normal process management and assume that everything will be OK. |
|
Hello @joelpelaez thank you very much for your work! Can it be reviewed again? smoke-test failed last time. |
The error with the smoke-test is from main branch, I don't understand why it fails. My change only resets SIGCHLD signal settings, it wouldn't change the program behavior. |
I found it, it's caused by the update to ubuntu:24.04. if (write_file_at (dir_fd, "uid_map", uid_map) != 0)
die_with_error ("setting up uid map"); |
I did a separated PR with the changes for re-enable user namespaces in CI (#728) |
Merged, please rebase. |
|
While rebasing, please squash your three commits into one "fully correct" commit. |
Signed-off-by: Joel Pelaez Jorge <joel.pelaez.jorge@gmail.com>
82ff3d9 to
80075f3
Compare
|
Thanks! Merging. |
Out of curiosity, wouldn't it be easier to enable squashing when merging? So maintainers can squash themselves if they want and don't have to wait for contributors, could be faster 😄 |
It's already allowed, but if the PR submitter needs to rebase the patch series anyway to get CI to pass, then they might as well make the patch series "correct" at the same time. And, in general, automatically squashing commits during merge is a lossy operation: non-trivial patch serieses often intentionally have more than one commit (like the common pattern "refactor; refactor more; add new feature that makes use of the refactorings"). This particular change was sufficiently simple that one commit was enough, but not all PRs fall into that category. This particular project also has a policy of requiring |
Some applications, like Erlang, call sigaction for SIGCHLD with
sa.sa_action = SIG_IGN, this causes bwrap never read child process exit status from signalfd.That behavior is explained in the function
do_notify_parentat kernel/signal.c from linux kernel source, to be exact, in this section evaluates the signal action value:https://github.com/torvalds/linux/blob/284922f4c563aa3a8558a00f2a05722133237fe8/kernel/signal.c#L2232-L2253
This fixes #705