aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2020-06-04 07:45:20 +0100
committerRon Yorston <rmy@pobox.com>2020-06-04 07:45:20 +0100
commit13c2b7ec49820e368f626acbe0793d075c6da576 (patch)
tree3295f4576679f21657585c9d2ef4402d3faaf42f
parent214caad089b620f2b210c0948b1526d64932a256 (diff)
downloadbusybox-w32-13c2b7ec49820e368f626acbe0793d075c6da576.tar.gz
busybox-w32-13c2b7ec49820e368f626acbe0793d075c6da576.tar.bz2
busybox-w32-13c2b7ec49820e368f626acbe0793d075c6da576.zip
time: detect when spawn fails
In the 64-bit build the time applet reported garbage when it was unable to run the program to be timed. The error return from mingw_spawn_pid() was incorrect.
-rw-r--r--win32/process.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/win32/process.c b/win32/process.c
index 5833a0323..54628acad 100644
--- a/win32/process.c
+++ b/win32/process.c
@@ -370,7 +370,7 @@ mingw_spawn_pid(int mode, char **argv)
370 370
371 ret = mingw_spawn_1(mode, argv[0], (char *const *)argv, environ); 371 ret = mingw_spawn_1(mode, argv[0], (char *const *)argv, environ);
372 372
373 return ret == -1 ? -1 : GetProcessId((HANDLE)ret); 373 return ret == -1 ? (pid_t)-1 : (pid_t)GetProcessId((HANDLE)ret);
374} 374}
375 375
376pid_t FAST_FUNC 376pid_t FAST_FUNC