summaryrefslogtreecommitdiffstats
path: root/generic/tclPipe.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-02-24 12:01:01 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-02-24 12:01:01 (GMT)
commita755c6601a9ede64e9e928be91f095c4954cf399 (patch)
treea321fdf66f4d6709dfae793e38f7e380e706baec /generic/tclPipe.c
parente718ec6850dc7cfe52d3e172833e65a1f927aa22 (diff)
parente20374dc6289dbcbd8a89d665c7aa418934ef59b (diff)
downloadtcl-a755c6601a9ede64e9e928be91f095c4954cf399.zip
tcl-a755c6601a9ede64e9e928be91f095c4954cf399.tar.gz
tcl-a755c6601a9ede64e9e928be91f095c4954cf399.tar.bz2
Merge 9.0
Diffstat (limited to 'generic/tclPipe.c')
-rw-r--r--generic/tclPipe.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tclPipe.c b/generic/tclPipe.c
index 1f5e4f1..137b415 100644
--- a/generic/tclPipe.c
+++ b/generic/tclPipe.c
@@ -433,7 +433,7 @@ TclCreatePipeline(
* pids of child processes. */
size_t numPids; /* Actual number of processes that exist at
* *pidPtr right now. */
- int cmdCount; /* Count of number of distinct commands found
+ size_t cmdCount; /* Count of number of distinct commands found
* in argc/argv. */
const char *inputLiteral = NULL;
/* If non-null, then this points to a string
@@ -1029,7 +1029,7 @@ Tcl_OpenCommandChannel(
TclFile *inPipePtr, *outPipePtr, *errFilePtr;
TclFile inPipe, outPipe, errFile;
size_t numPids;
- Tcl_Pid *pidPtr;
+ Tcl_Pid *pidPtr = NULL;
Tcl_Channel channel;
inPipe = outPipe = errFile = NULL;
@@ -1041,7 +1041,7 @@ Tcl_OpenCommandChannel(
numPids = TclCreatePipeline(interp, argc, argv, &pidPtr, inPipePtr,
outPipePtr, errFilePtr);
- if (numPids < 0) {
+ if (numPids == TCL_INDEX_NONE) {
goto error;
}
@@ -1081,7 +1081,7 @@ Tcl_OpenCommandChannel(
return channel;
error:
- if (numPids > 0) {
+ if (pidPtr) {
Tcl_DetachPids(numPids, pidPtr);
Tcl_Free(pidPtr);
}