summaryrefslogtreecommitdiff
path: root/sbin/shutdown
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2001-01-15 20:04:08 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2001-01-15 20:04:08 +0000
commit22559135ed5223c81e7a49b8726db8ee1927e322 (patch)
treec94addf0084ea5c27b7a2a8b90e857b6b65d1516 /sbin/shutdown
parentb22d40939cd486ade46628bef4e1bd88a5405638 (diff)
use _exit() in term handler if real signal
Diffstat (limited to 'sbin/shutdown')
-rw-r--r--sbin/shutdown/shutdown.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sbin/shutdown/shutdown.c b/sbin/shutdown/shutdown.c
index 7f5ff6605ab..74357ac023e 100644
--- a/sbin/shutdown/shutdown.c
+++ b/sbin/shutdown/shutdown.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: shutdown.c,v 1.18 2000/01/15 07:00:43 ericj Exp $ */
+/* $OpenBSD: shutdown.c,v 1.19 2001/01/15 20:04:07 deraadt Exp $ */
/* $NetBSD: shutdown.c,v 1.9 1995/03/18 15:01:09 cgd Exp $ */
/*
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)shutdown.c 8.2 (Berkeley) 2/16/94";
#else
-static char rcsid[] = "$OpenBSD: shutdown.c,v 1.18 2000/01/15 07:00:43 ericj Exp $";
+static char rcsid[] = "$OpenBSD: shutdown.c,v 1.19 2001/01/15 20:04:07 deraadt Exp $";
#endif
#endif /* not lint */
@@ -561,7 +561,10 @@ finish(signo)
{
if (!killflg)
(void)unlink(_PATH_NOLOGIN);
- exit(0);
+ if (signo == 0)
+ exit(0);
+ else
+ _exit(0);
}
void