diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-06-03 08:06:02 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-06-03 08:06:02 +0000 |
commit | 28caacc4b34d02cc7743412a5f54a70d2a98c7e6 (patch) | |
tree | ec5446a534be797f758d9b789281fd04f0b3bbfa /usr.sbin | |
parent | dba08152e0fb1aac909bd6ca725765ad97cf8b13 (diff) |
use sigsetops, and do cross-block signal handlers
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/inetd/inetd.c | 11 |
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; |