diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2007-01-24 10:26:01 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2007-01-24 10:26:01 +0000 |
commit | 9f0058571b27925741768083966ba3247576ddba (patch) | |
tree | 64149f3010f7f9ac3c91efbaa41686e98cc8d23b /usr.sbin/hoststated | |
parent | b782caa62d7920658623c10fe26ee064af6fa651 (diff) |
Similar to ospfd and ripd ignore SIGPIPE in all processes to be able to do
a nice exit in case one of the processes dies. OK pyr@
Diffstat (limited to 'usr.sbin/hoststated')
-rw-r--r-- | usr.sbin/hoststated/hce.c | 3 | ||||
-rw-r--r-- | usr.sbin/hoststated/hoststated.c | 3 | ||||
-rw-r--r-- | usr.sbin/hoststated/pfe.c | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/usr.sbin/hoststated/hce.c b/usr.sbin/hoststated/hce.c index 012a5dbf63f..aceef6f8e88 100644 --- a/usr.sbin/hoststated/hce.c +++ b/usr.sbin/hoststated/hce.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hce.c,v 1.10 2007/01/11 18:05:08 reyk Exp $ */ +/* $OpenBSD: hce.c,v 1.11 2007/01/24 10:26:00 claudio Exp $ */ /* * Copyright (c) 2006 Pierre-Yves Ritschard <pyr@spootnik.org> @@ -107,6 +107,7 @@ hce(struct hoststated *x_env, int pipe_parent2pfe[2], int pipe_parent2hce[2], signal_set(&ev_sigterm, SIGTERM, hce_sig_handler, NULL); signal_add(&ev_sigint, NULL); signal_add(&ev_sigterm, NULL); + signal(SIGPIPE, SIG_IGN); /* setup pipes */ close(pipe_pfe2hce[1]); diff --git a/usr.sbin/hoststated/hoststated.c b/usr.sbin/hoststated/hoststated.c index c2d08e61ae6..7e9b2cd8d00 100644 --- a/usr.sbin/hoststated/hoststated.c +++ b/usr.sbin/hoststated/hoststated.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hoststated.c,v 1.11 2007/01/11 18:28:28 pyr Exp $ */ +/* $OpenBSD: hoststated.c,v 1.12 2007/01/24 10:26:00 claudio Exp $ */ /* * Copyright (c) 2006 Pierre-Yves Ritschard <pyr@spootnik.org> @@ -179,6 +179,7 @@ main(int argc, char *argv[]) signal_add(&ev_sigterm, NULL); signal_add(&ev_sigchld, NULL); signal_add(&ev_sighup, NULL); + signal(SIGPIPE, SIG_IGN); close(pipe_parent2pfe[1]); close(pipe_parent2hce[1]); diff --git a/usr.sbin/hoststated/pfe.c b/usr.sbin/hoststated/pfe.c index 4c14a2b6a2f..1077928d1ef 100644 --- a/usr.sbin/hoststated/pfe.c +++ b/usr.sbin/hoststated/pfe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfe.c,v 1.7 2007/01/09 13:50:11 pyr Exp $ */ +/* $OpenBSD: pfe.c,v 1.8 2007/01/24 10:26:00 claudio Exp $ */ /* * Copyright (c) 2006 Pierre-Yves Ritschard <pyr@spootnik.org> @@ -105,6 +105,7 @@ pfe(struct hoststated *x_env, int pipe_parent2pfe[2], int pipe_parent2hce[2], signal_set(&ev_sigterm, SIGTERM, pfe_sig_handler, NULL); signal_add(&ev_sigint, NULL); signal_add(&ev_sigterm, NULL); + signal(SIGPIPE, SIG_IGN); /* setup pipes */ close(pipe_pfe2hce[0]); |