From b03ba4c7f1a99562e772365e180b4c8a7f5d576a Mon Sep 17 00:00:00 2001 From: hobbs Date: Wed, 6 Sep 2000 18:46:13 +0000 Subject: * unix/tclUnixPipe.c (TclpCreateProcess): Removed WNOHANG from Tcl_WaitPid call in error case of process creation on Unix, as it would lead to defunct processes. [Bug: 6148] --- unix/tclUnixPipe.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/unix/tclUnixPipe.c b/unix/tclUnixPipe.c index d234245..0b56333 100644 --- a/unix/tclUnixPipe.c +++ b/unix/tclUnixPipe.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixPipe.c,v 1.9 2000/03/31 19:39:42 ericm Exp $ + * RCS: @(#) $Id: tclUnixPipe.c,v 1.10 2000/09/06 18:46:13 hobbs Exp $ */ #include "tclInt.h" @@ -444,10 +444,12 @@ TclpCreateProcess(interp, argc, argv, inputFile, outputFile, errorFile, if (pid != -1) { /* * Reap the child process now if an error occurred during its - * startup. + * startup. We don't call this with WNOHANG because that can lead to + * defunct processes on an MP system. We shouldn't have to worry + * about hanging here, since this is the error case. [Bug: 6148] */ - Tcl_WaitPid((Tcl_Pid) pid, &status, WNOHANG); + Tcl_WaitPid((Tcl_Pid) pid, &status, 0); } if (errPipeIn) { -- cgit v0.12