SIGINT, SIGQUIT: We should probably intercept these and expose an interface similar to what exists on System.Console for handling them.
SIGCONT, SIGWINCH: We already handle these (for restoring termios state and updating window width/height).
SIGCHLD: Not relevant for this issue; see #2.
It might make sense to let System.Console initialize these handlers first, and then hijacking them after. This would reduce the level of damage that could be done to System.Terminal internal state if a user accidentally accesses System.Console.
CoreCLR registers a number of signal handlers if
System.Console
is used: https://github.com/dotnet/runtime/blob/4f9ae42d861fcb4be2fcd5d3d55d5f227d30e723/src/libraries/Native/Unix/System.Native/pal_signal.c#L307-L314We need to figure out what to do with these.
SIGINT
,SIGQUIT
: We should probably intercept these and expose an interface similar to what exists onSystem.Console
for handling them.SIGCONT
,SIGWINCH
: We already handle these (for restoringtermios
state and updating window width/height).SIGCHLD
: Not relevant for this issue; see #2.It might make sense to let
System.Console
initialize these handlers first, and then hijacking them after. This would reduce the level of damage that could be done to System.Terminal internal state if a user accidentally accessesSystem.Console
.