diff options
author | Ron Yorston <rmy@pobox.com> | 2020-06-04 07:45:20 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2020-06-04 07:45:20 +0100 |
commit | 13c2b7ec49820e368f626acbe0793d075c6da576 (patch) | |
tree | 3295f4576679f21657585c9d2ef4402d3faaf42f | |
parent | 214caad089b620f2b210c0948b1526d64932a256 (diff) | |
download | busybox-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.c | 2 |
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 | ||
376 | pid_t FAST_FUNC | 376 | pid_t FAST_FUNC |