mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:17:44 +00:00
Shell: Re-block SIGTT{IN,OU} on start
This also shows up when trying to read from a 0x0 buffer as it has no PTY attached, avoid the mess by just blocking them (instead of ignoring them).
This commit is contained in:
parent
922fa2e9d0
commit
77cc8c5612
1 changed files with 6 additions and 0 deletions
|
@ -55,6 +55,12 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
s_shell->setup_signals();
|
||||
|
||||
sigset_t blocked;
|
||||
sigemptyset(&blocked);
|
||||
sigaddset(&blocked, SIGTTOU);
|
||||
sigaddset(&blocked, SIGTTIN);
|
||||
pthread_sigmask(SIG_BLOCK, &blocked, nullptr);
|
||||
|
||||
shell->termios = editor->termios();
|
||||
shell->default_termios = editor->default_termios();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue