summaryrefslogtreecommitdiff
path: root/usr.sbin/inetd/inetd.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1998-06-03 08:06:02 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1998-06-03 08:06:02 +0000
commit28caacc4b34d02cc7743412a5f54a70d2a98c7e6 (patch)
treeec5446a534be797f758d9b789281fd04f0b3bbfa /usr.sbin/inetd/inetd.c
parentdba08152e0fb1aac909bd6ca725765ad97cf8b13 (diff)
use sigsetops, and do cross-block signal handlers
Diffstat (limited to 'usr.sbin/inetd/inetd.c')
-rw-r--r--usr.sbin/inetd/inetd.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/usr.sbin/inetd/inetd.c b/usr.sbin/inetd/inetd.c
index 401045ccc10..5b014e44ae9 100644
--- a/usr.sbin/inetd/inetd.c
+++ b/usr.sbin/inetd/inetd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: inetd.c,v 1.46 1998/03/12 00:19:16 deraadt Exp $ */
+/* $OpenBSD: inetd.c,v 1.47 1998/06/03 08:06:01 deraadt Exp $ */
/* $NetBSD: inetd.c,v 1.11 1996/02/22 11:14:41 mycroft Exp $ */
/*
* Copyright (c) 1983,1991 The Regents of the University of California.
@@ -41,7 +41,7 @@ char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)inetd.c 5.30 (Berkeley) 6/3/91";*/
-static char rcsid[] = "$OpenBSD: inetd.c,v 1.46 1998/03/12 00:19:16 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: inetd.c,v 1.47 1998/06/03 08:06:01 deraadt Exp $";
#endif /* not lint */
/*
@@ -382,10 +382,13 @@ main(argc, argv, envp)
#endif
memset((char *)&sa, 0, sizeof(sa));
- sa.sa_mask = SIGBLOCK;
+ sigemptyset(&sa.sa_mask);
+ sigaddset(&sa.sa_mask, SIGALRM);
+ sigaddset(&sa.sa_mask, SIGCHLD);
+ sigaddset(&sa.sa_mask, SIGHUP);
sa.sa_handler = retry;
sigaction(SIGALRM, &sa, NULL);
- config(0);
+ config(SIGHUP);
sa.sa_handler = config;
sigaction(SIGHUP, &sa, NULL);
sa.sa_handler = reapchild;