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

@@ -3258,7 +3258,7 @@ main(int argc, char **argv)
hostnames = DEFAULT_COMMAND_SOCKET",127.0.0.1,::1";
}
UTI_SetQuitSignalsHandler(signal_handler);
UTI_SetQuitSignalsHandler(signal_handler, 0);
sockaddrs = get_sockaddrs(hostnames, port);