catch SIGTSTP and save/restore terminal settings (#4460)
authorSimon Marlow <marlowsd@gmail.com>
Fri, 7 Jan 2011 12:40:42 +0000 (12:40 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Fri, 7 Jan 2011 12:40:42 +0000 (12:40 +0000)
commit8625c675de45bdb8bcfa795572ce7c47687c147c
tree279efd8a2b66a8486e8e7859ce4415eff06753cc
parent62db6241c578f2b02e266b4dd0b535e0f59950bf
catch SIGTSTP and save/restore terminal settings (#4460)
As far as I can tell, it is the responsibility of the program to save
and restore its own terminal settings across a suspend/foreground, the
shell doesn't do it (which seems odd).  So I've added a signal handler
for SIGTSTP to the RTS which will save and restore the terminal
settings iff we modified them with hSetBuffering or hSetEcho (we
already restore them at exit time in these cases).
rts/posix/Signals.c