When a terminal is used, signals are now forwared to the foreground
process inside the sandbox. As a result, control commands like Ctrl+C
can be handled by the terminal in the guest.
The sentry may get SIGPIPE from writing to readerless pipes or shutdown
sockets; in these cases, it's incorrect to forward the SIGPIPE to app PID 1.
(It would be correct to send SIGPIPE to the app thread performing the write
instead, but we can't do so with signal forwarding since (1) we can't identify
the correct app thread to signal and (2) Go signal handling with os/signal is
async - the sentry thread that received SIGPIPE continued execution after doing
so, so the app thread may already be running. Having the sentry send SIGPIPE
independently of the host is gvisor.dev/issue/161.)
Updates #7293
PiperOrigin-RevId: 445469810
- Stub out sighandling functions with panics on Darwin
- Put Linux-specific errors into their own syserr file
Not sure how best to get automated tests running, so I'll leave that for a later
change.
Fixes#6839.
Related to #1270.
PiperOrigin-RevId: 409516969