use termination function on SIGPIPE (write to closed socket) too

This commit is contained in:
marschap
2008-05-02 09:58:58 +00:00
parent decb627924
commit c0f4a7008c
3 changed files with 3 additions and 1 deletions
+1
View File
@@ -161,6 +161,7 @@ int main(int argc, char **argv)
sigaction(SIGINT, &sa, NULL); // Ctrl-C
sigaction(SIGTERM, &sa, NULL); // "regular" kill
sigaction(SIGHUP, &sa, NULL); // kill -HUP
sigaction(SIGPIPE, &sa, NULL); // write to closed socket
sigaction(SIGKILL, &sa, NULL); // kill -9 [cannot be trapped; but ...]
/* setup signal handler for children to avoid zombies */