847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
|
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
|
-
+
|
*
* Given a HANDLE to a child process, return the process id for that
* child process.
*
* Results:
* Returns the process id for the child process. If the pid was not known
* by Tcl, either because the pid was not created by Tcl or the child
* process has already been reaped, (size_t)-1 is returned.
* process has already been reaped, TCL_IO_FAILURE is returned.
*
* Side effects:
* None.
*
*--------------------------------------------------------------------------
*/
|
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
|
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
|
-
+
|
for (infoPtr = procList; infoPtr != NULL; infoPtr = infoPtr->nextPtr) {
if (infoPtr->dwProcessId == (size_t) pid) {
Tcl_MutexUnlock(&pipeMutex);
return infoPtr->dwProcessId;
}
}
Tcl_MutexUnlock(&pipeMutex);
return (size_t)-1;
return TCL_IO_FAILURE;
}
/*
*----------------------------------------------------------------------
*
* TclpCreateProcess --
*
|