Ignore SIGTTOU

We can get this signal while suspending if a parent process (say
git-commit) has already put us in the background. We still need
to reset the termios state to exit raw input mode and make the shell
usable.

Fixes #3069
This commit is contained in:
Maxime Coste 2019-11-18 20:57:49 +11:00
parent 0dd6ea83d8
commit ba621dedd6

View File

@ -966,6 +966,7 @@ int main(int argc, char* argv[])
set_signal_handler(SIGPIPE, [](int){}); set_signal_handler(SIGPIPE, [](int){});
set_signal_handler(SIGINT, [](int){}); set_signal_handler(SIGINT, [](int){});
set_signal_handler(SIGCHLD, [](int){}); set_signal_handler(SIGCHLD, [](int){});
set_signal_handler(SIGTTOU, SIG_IGN);
const ParameterDesc param_desc{ const ParameterDesc param_desc{
SwitchMap{ { "c", { true, "connect to given session" } }, SwitchMap{ { "c", { true, "connect to given session" } },