Backend ignore of SIGPIPE. This occurs if client quits unexpectedly over the UNIX socket.

This is a timing issue but occurs more frequently in large RESTCONF messgaes.
This commit is contained in:
Olof hagsand 2022-02-14 20:53:31 +01:00
parent b7c0113331
commit 78bdc4eaca
3 changed files with 12 additions and 1 deletions

View file

@ -1021,6 +1021,11 @@ main(int argc,
clicon_err(OE_DAEMON, errno, "Setting signal");
goto done;
}
/* Client exit in the middle of a transaction, handled in clicon_msg_send */
if (set_signal(SIGPIPE, SIG_IGN, NULL) < 0){
clicon_err(OE_DAEMON, errno, "Setting signal");
goto done;
}
/* Initialize server socket and save it to handle */
if ((ss = backend_server_socket(h)) < 0)
goto done;