summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2000-09-06 18:46:13 (GMT)
committerhobbs <hobbs>2000-09-06 18:46:13 (GMT)
commitb03ba4c7f1a99562e772365e180b4c8a7f5d576a (patch)
treec3024605ec680290621a4399d0393442f3f8b20f
parent9997e8fe39d3c62e5bf2723a5130902bf34691d0 (diff)
downloadtcl-b03ba4c7f1a99562e772365e180b4c8a7f5d576a.zip
tcl-b03ba4c7f1a99562e772365e180b4c8a7f5d576a.tar.gz
tcl-b03ba4c7f1a99562e772365e180b4c8a7f5d576a.tar.bz2
* 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]
-rw-r--r--unix/tclUnixPipe.c8
1 files 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) {