mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 15:16:14 +00:00
Shell: Keep the TTY on the same pgroup to get tty signals
This allows the shell to be notified about SIGWINCH even when a child process is running in the foreground.
This commit is contained in:
committed by
Andreas Kling
parent
5fedf90bf9
commit
5cdb0ef2e5
@@ -61,6 +61,8 @@ int main(int argc, char** argv)
|
||||
Core::EventLoop loop;
|
||||
|
||||
signal(SIGINT, [](int) {
|
||||
if (!s_shell->is_accepting_signals())
|
||||
return;
|
||||
editor->interrupted();
|
||||
});
|
||||
|
||||
@@ -68,7 +70,12 @@ int main(int argc, char** argv)
|
||||
editor->resized();
|
||||
});
|
||||
|
||||
signal(SIGTTIN, [](int) {});
|
||||
signal(SIGTTOU, [](int) {});
|
||||
|
||||
signal(SIGHUP, [](int) {
|
||||
if (!s_shell->is_accepting_signals())
|
||||
return;
|
||||
s_shell->save_history();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user