From 28caacc4b34d02cc7743412a5f54a70d2a98c7e6 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Wed, 3 Jun 1998 08:06:02 +0000 Subject: use sigsetops, and do cross-block signal handlers --- usr.sbin/inetd/inetd.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'usr.sbin/inetd/inetd.c') 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; -- cgit v1.2.3