mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
Ignore SIGPIPE signals
If the remote end of a socket is closed between when an input character is received from the serial port and when it is written to the socket, tio will receive a SIGPIPE signal when writing the character to the socket, which will terminate the program. To prevent this, ignore the signal, which will cause write(2) to return -EPIPE, causing tio to close the socket.
This commit is contained in:
parent
1219c6b8c0
commit
db765bc371
1 changed files with 1 additions and 0 deletions
|
|
@ -47,4 +47,5 @@ void signal_handlers_install(void)
|
|||
{
|
||||
signal(SIGHUP, signal_handler);
|
||||
signal(SIGINT, signal_handler);
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue