Support resizing the Terminal app.

I set it up so that TIOCSWINSZ on a master PTY gets forwarded to the slave.
This feels intuitively right. Terminal can then use that to inform the shell
or whoever is inside the slave that the window size has changed.

TIOCSWINSZ also triggers the generation of a SIGWINCH signal. :^)
This commit is contained in:
Andreas Kling 2019-02-20 23:32:33 +01:00
parent 0ca3112301
commit 0aaec6b19a
Notes: sideshowbarker 2024-07-19 15:39:26 +09:00
6 changed files with 74 additions and 19 deletions

View file

@ -1868,6 +1868,7 @@ void Process::set_default_signal_dispositions()
// FIXME: Set up all the right default actions. See signal(7).
memset(&m_signal_action_data, 0, sizeof(m_signal_action_data));
m_signal_action_data[SIGCHLD].handler_or_sigaction = LinearAddress((dword)SIG_IGN);
m_signal_action_data[SIGWINCH].handler_or_sigaction = LinearAddress((dword)SIG_IGN);
}
int Process::sys$sigaction(int signum, const sigaction* act, sigaction* old_act)