664 |
DWORD wait_return; |
DWORD wait_return; |
665 |
HANDLE ready_hand; |
HANDLE ready_hand; |
666 |
bool_t child_dead = FALSE; |
bool_t child_dead = FALSE; |
667 |
|
BOOL GetExitCodeResult; |
668 |
|
|
669 |
/* |
/* |
670 |
* Create stdin thread, if needed |
* Create stdin thread, if needed |
671 |
*/ |
*/ |
672 |
pproc->inp = stdin_data; |
pproc->inp = stdin_data; |
673 |
pproc->incnt = stdin_data_len; |
pproc->incnt = stdin_data_len; |
674 |
if (!pproc->inp) { |
if (!pproc->inp) { |
675 |
stdin_eof = TRUE; |
stdin_eof = TRUE; |
676 |
CloseHandle((HANDLE)pproc->sv_stdin[0]); |
CloseHandle((HANDLE)pproc->sv_stdin[0]); |
762 |
|
|
763 |
} else if (ready_hand == childhand) { |
} else if (ready_hand == childhand) { |
764 |
|
|
765 |
if (GetExitCodeProcess(childhand, &pproc->exit_code) == FALSE) { |
GetExitCodeResult = GetExitCodeProcess(childhand, (DWORD*)&pproc->exit_code); |
766 |
|
if (GetExitCodeResult == FALSE) { |
767 |
pproc->last_err = GetLastError(); |
pproc->last_err = GetLastError(); |
768 |
pproc->lerrno = E_SCALL; |
pproc->lerrno = E_SCALL; |
769 |
goto done; |
goto done; |
810 |
sub_process *pproc; |
sub_process *pproc; |
811 |
HANDLE childhand; |
HANDLE childhand; |
812 |
DWORD wait_return; |
DWORD wait_return; |
813 |
|
BOOL GetExitCodeResult; |
814 |
|
|
815 |
if (proc == NULL) |
if (proc == NULL) |
816 |
pproc = process_wait_for_any_private(); |
pproc = process_wait_for_any_private(); |
854 |
goto done2; |
goto done2; |
855 |
} |
} |
856 |
|
|
857 |
if (GetExitCodeProcess(childhand, &pproc->exit_code) == FALSE) { |
GetExitCodeResult = GetExitCodeProcess(childhand, (DWORD*)&pproc->exit_code); |
858 |
|
if (GetExitCodeResult == FALSE) { |
859 |
pproc->last_err = GetLastError(); |
pproc->last_err = GetLastError(); |
860 |
pproc->lerrno = E_SCALL; |
pproc->lerrno = E_SCALL; |
861 |
} |
} |