diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-08-01 04:24:24 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-08-01 04:24:24 +0000 |
commit | a7867d0afe06715af8daed54e07334b50c98a192 (patch) | |
tree | b120c8eb6fe966ff38d3f39338637e9c7bf3d56e /win32/win32.c | |
parent | aaa68c4a88ea4a62f62819baf4cacc0ca679c5fa (diff) | |
download | perl-a7867d0afe06715af8daed54e07334b50c98a192.tar.gz |
various syntax errors and such (not fixed: comp/require.t#22 coredump
on Windows)
p4raw-id: //depot/perl@6476
Diffstat (limited to 'win32/win32.c')
-rw-r--r-- | win32/win32.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/win32/win32.c b/win32/win32.c index 3c3d1e56e7..6856884472 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -1666,20 +1666,19 @@ win32_waitpid(int pid, int *status, int flags) long child = find_pid(pid); if (child >= 0) { HANDLE hProcess = w32_child_handles[child]; - DWORD timeout=(flags&WNOHANG)?0:INFINITE; - DWORD waitcode = WaitForSingleObject(hProcess, timeout); - if (waitcode == WAIT_TIMEOUT) { - { - return 0; - } - else if (waitcode != WAIT_FAILED) { - if (GetExitCodeProcess(hProcess, &waitcode)) { - *status = (int)((waitcode & 0xff) << 8); - retval = (int)w32_child_pids[child]; - remove_dead_process(child); - return retval; - } + DWORD timeout = (flags & WNOHANG) ? 0 : INFINITE; + DWORD waitcode = WaitForSingleObject(hProcess, timeout); + if (waitcode == WAIT_TIMEOUT) { + return 0; + } + else if (waitcode != WAIT_FAILED) { + if (GetExitCodeProcess(hProcess, &waitcode)) { + *status = (int)((waitcode & 0xff) << 8); + retval = (int)w32_child_pids[child]; + remove_dead_process(child); + return retval; } + } else errno = ECHILD; } |