mirror of
https://github.com/wez/wezterm.git
synced 2025-01-08 23:17:36 +03:00
pty: unix: empty signal mask in the spawned child
A user reported that ctrl-c and ctrl-\ had no effect for them in bash when spawned in a particular way on their system. It turned out that the spawning environment had blocked SIGINT, SIGHUP and SIGQUIT and that was propagated all the way down through the wezterm process to the spawned shell. Let's ensure that we clear all blocked signals prior to launching our child process.
This commit is contained in:
parent
16f5d116e7
commit
f2a2d099bb
@ -216,6 +216,9 @@ impl PtyFd {
|
||||
libc::signal(*signo, libc::SIG_DFL);
|
||||
}
|
||||
|
||||
let empty_set: libc::sigset_t = std::mem::zeroed();
|
||||
libc::sigprocmask(libc::SIG_SETMASK, &empty_set, std::ptr::null_mut());
|
||||
|
||||
// Establish ourselves as a session leader.
|
||||
if libc::setsid() == -1 {
|
||||
return Err(io::Error::last_os_error());
|
||||
|
Loading…
Reference in New Issue
Block a user