aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--win32/process.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/win32/process.c b/win32/process.c
index de8f653c5..d6176ca23 100644
--- a/win32/process.c
+++ b/win32/process.c
@@ -12,7 +12,11 @@ int waitpid(pid_t pid, int *status, int options)
12 FALSE, pid)) != NULL ) { 12 FALSE, pid)) != NULL ) {
13 ret = _cwait(status, (intptr_t)proc, 0); 13 ret = _cwait(status, (intptr_t)proc, 0);
14 CloseHandle(proc); 14 CloseHandle(proc);
15 return ret == -1 ? -1 : pid; 15 if (ret == -1) {
16 return -1;
17 }
18 *status <<= 8;
19 return pid;
16 } 20 }
17 } 21 }
18 errno = pid < 0 ? ENOSYS : EINVAL; 22 errno = pid < 0 ? ENOSYS : EINVAL;