From: deraadt Date: Fri, 6 Dec 1996 02:28:58 +0000 (+0000) Subject: wait for spawned children, and remember to EXIT INOUR CHILD! geez.. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a5252d9596789b37d81a45121226752937620e01;p=openbsd wait for spawned children, and remember to EXIT INOUR CHILD! geez.. --- diff --git a/usr.bin/window/wwspawn.c b/usr.bin/window/wwspawn.c index 07cabd0d552..b64af45d103 100644 --- a/usr.bin/window/wwspawn.c +++ b/usr.bin/window/wwspawn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wwspawn.c,v 1.3 1996/06/26 05:43:52 deraadt Exp $ */ +/* $OpenBSD: wwspawn.c,v 1.4 1996/12/06 02:28:58 deraadt Exp $ */ /* $NetBSD: wwspawn.c,v 1.4 1995/12/21 08:39:57 mycroft Exp $ */ /* @@ -41,12 +41,13 @@ #if 0 static char sccsid[] = "@(#)wwspawn.c 8.1 (Berkeley) 6/6/93"; #else -static char rcsid[] = "$OpenBSD: wwspawn.c,v 1.3 1996/06/26 05:43:52 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: wwspawn.c,v 1.4 1996/12/06 02:28:58 deraadt Exp $"; #endif #endif /* not lint */ #include "ww.h" #include +#include /* * There is a dead lock with vfork and closing of pseudo-ports. @@ -77,6 +78,7 @@ char **argv; erred = 1; _exit(1); default: + (void) wait(NULL); if (erred) { wwerrno = WWE_SYS; ret = -1; diff --git a/usr.bin/window/wwterminfo.c b/usr.bin/window/wwterminfo.c index 0152301d77e..295cd288e3f 100644 --- a/usr.bin/window/wwterminfo.c +++ b/usr.bin/window/wwterminfo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wwterminfo.c,v 1.2 1996/06/26 05:43:53 deraadt Exp $ */ +/* $OpenBSD: wwterminfo.c,v 1.3 1996/12/06 02:29:00 deraadt Exp $ */ /* * Copyright (c) 1982, 1993 @@ -100,8 +100,9 @@ wwterminfoend() return -1; case 0: execl(_PATH_RM, _PATH_RM, "-rf", wwterminfopath, 0); - return -1; + _exit(1); default: + (void)wait(NULL); return 0; } }