summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2010-12-14 23:32:06 +0000
committermillert <millert@openbsd.org>2010-12-14 23:32:06 +0000
commitd038e17a4723c783d509bffd30c3e997419cdd81 (patch)
tree8521d748f20639a48de60aa2743a520d620bb72a
parentTreat a missing spool dir like an empty one. OK deraadt@ (diff)
downloadwireguard-openbsd-d038e17a4723c783d509bffd30c3e997419cdd81.tar.xz
wireguard-openbsd-d038e17a4723c783d509bffd30c3e997419cdd81.zip
Use _exit() not exit() after forking. OK deraadt@
-rw-r--r--usr.sbin/cron/do_command.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/cron/do_command.c b/usr.sbin/cron/do_command.c
index 693e166cb87..f6f3e97c3da 100644
--- a/usr.sbin/cron/do_command.c
+++ b/usr.sbin/cron/do_command.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: do_command.c,v 1.33 2009/10/27 23:59:51 deraadt Exp $ */
+/* $OpenBSD: do_command.c,v 1.34 2010/12/14 23:32:06 millert Exp $ */
/* Copyright 1988,1990,1993,1994 by Paul Vixie
* All rights reserved
@@ -127,7 +127,7 @@ child_process(entry *e, user *u) {
switch (fork()) {
case -1:
log_it("CRON", getpid(), "error", "can't fork");
- exit(ERROR_EXIT);
+ _exit(ERROR_EXIT);
/*NOTREACHED*/
case 0:
Debug(DPROC, ("[%ld] grandchild process fork()'ed\n",
@@ -343,7 +343,7 @@ child_process(entry *e, user *u) {
Debug(DPROC, ("[%ld] child2 done sending to grandchild\n",
(long)getpid()))
- exit(0);
+ _exit(OK_EXIT);
}
/* close the pipe to the grandkiddie's stdin, since its wicked uncle