diff options
author | Geoffrey Thomas <geofft@ldpreload.com> | 2015-10-19 19:33:28 +0530 |
---|---|---|
committer | Siddhesh Poyarekar <siddhesh@redhat.com> | 2015-10-19 19:33:28 +0530 |
commit | 2028f49dabb94bd56a85a7be16141bee4853aae6 (patch) | |
tree | 069f111a51dac97c261ca5a155f7168ea8a111b1 /hurd/catch-signal.c | |
parent | 361468f226cb99fdebd8fabb3d9428a3632dc2d1 (diff) | |
download | glibc-2028f49dabb94bd56a85a7be16141bee4853aae6.tar.gz glibc-2028f49dabb94bd56a85a7be16141bee4853aae6.tar.xz glibc-2028f49dabb94bd56a85a7be16141bee4853aae6.zip |
pt_chown: Clear any signal mask inherited from the parent process.
If grantpt() is called from a thread that is masking signals (for instance, from a program using signalfd or using a dedicated signal-handling thread), then that mask will get inherited to pt_chown. This means that signals like SIGINT will not interrup pt_chown, so if it hangs (e.g., because getgrnam("tty") hangs on a remote name service), Ctrl-C will terminate the parent process but leave pt_chown around. Since it's setuid, it's hard to kill any other way. It is safe for pt_chown to unmask all signals, because grantpt() can be (and usually is) called from an unprivileged process with all signals unmasked.
Diffstat (limited to 'hurd/catch-signal.c')
0 files changed, 0 insertions, 0 deletions