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

2
main.c
View File

@@ -586,7 +586,7 @@ int main
/* From now on, it is safe to do finalisation on exit */
initialised = 1;
UTI_SetQuitSignalsHandler(signal_cleanup);
UTI_SetQuitSignalsHandler(signal_cleanup, 1);
CAM_OpenUnixSocket();