util: handle or ignore SIGPIPE signal

In chronyc handle SIGPIPE similarly to SIGTERM. In chronyd ignore the
signal to avoid crashing when a TCP socket will be needed (e.g. for
NTS-KE) and will be unexpectedly closed from the other side.
This commit is contained in:
Miroslav Lichvar
2018-08-01 12:20:17 +02:00
parent 5bb2bf9361
commit 879d936277
5 changed files with 11 additions and 5 deletions

View File

@@ -700,7 +700,7 @@ PRV_StartHelper(void)
}
/* ignore signals, the process will exit on OP_QUIT request */
UTI_SetQuitSignalsHandler(SIG_IGN);
UTI_SetQuitSignalsHandler(SIG_IGN, 1);
helper_main(sock_pair[1]);