summaryrefslogtreecommitdiff
path: root/usr.sbin/syslogd/privsep.c
diff options
context:
space:
mode:
authorCan Erkin Acar <canacar@cvs.openbsd.org>2004-04-09 20:13:26 +0000
committerCan Erkin Acar <canacar@cvs.openbsd.org>2004-04-09 20:13:26 +0000
commit41384ee3a3456ddaea85053f51fcb015eddada50 (patch)
tree5dc4137eb108bf0879add771f78b0c63b1f54d6f /usr.sbin/syslogd/privsep.c
parent6d2ad0bf0512630f2863296ea6ff1a431005d505 (diff)
Also pass SIGINT and SIGQUIT to child, noticed by mpech@
ok avsm@
Diffstat (limited to 'usr.sbin/syslogd/privsep.c')
-rw-r--r--usr.sbin/syslogd/privsep.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/syslogd/privsep.c b/usr.sbin/syslogd/privsep.c
index be787c81feb..c4bb5ed8864 100644
--- a/usr.sbin/syslogd/privsep.c
+++ b/usr.sbin/syslogd/privsep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: privsep.c,v 1.17 2004/04/02 21:44:50 avsm Exp $ */
+/* $OpenBSD: privsep.c,v 1.18 2004/04/09 20:13:25 canacar Exp $ */
/*
* Copyright (c) 2003 Anil Madhavapeddy <anil@recoil.org>
@@ -156,9 +156,11 @@ priv_init(char *conf, int numeric, int lockfd, int nullfd, char *argv[])
close(nullfd);
/* Father */
- /* Pass TERM/HUP through to child, and accept CHLD */
+ /* Pass TERM/HUP/INT/QUIT through to child, and accept CHLD */
signal(SIGTERM, sig_pass_to_chld);
signal(SIGHUP, sig_pass_to_chld);
+ signal(SIGINT, sig_pass_to_chld);
+ signal(SIGQUIT, sig_pass_to_chld);
signal(SIGCHLD, sig_got_chld);
setproctitle("[priv]");
@@ -608,7 +610,7 @@ priv_gethostbyaddr(char *addr, int addr_len, int af, char *res, size_t res_len)
return ret_len;
}
-/* If priv parent gets a TERM or HUP, pass it through to child instead */
+/* Pass the signal through to child */
static void
sig_pass_to_chld(int sig)
{