aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2017-08-03 12:33:40 +0100
committerRon Yorston <rmy@pobox.com>2017-08-03 12:33:40 +0100
commitc3ca46e619744ccd6c597417cc8e373149608909 (patch)
treead00b2085cb7a5f64112f330225a3e776402d4a3 /shell
parent8e20d4e9264a30dcc6d652943211668b1a6fe85b (diff)
downloadbusybox-w32-c3ca46e619744ccd6c597417cc8e373149608909.tar.gz
busybox-w32-c3ca46e619744ccd6c597417cc8e373149608909.tar.bz2
busybox-w32-c3ca46e619744ccd6c597417cc8e373149608909.zip
ash: fixes to wait status
Replace W* macros with versions from GNU C library. Change wait status values to match.
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 18e53a0da..758187ccd 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -4378,14 +4378,14 @@ waitpid_child(int *status, int wait_flags)
4378 pid = pidlist[1]; 4378 pid = pidlist[1];
4379 free(pidlist); 4379 free(pidlist);
4380 free(proclist); 4380 free(proclist);
4381 *status = 260; /* terminated by a signal */ 4381 *status = 128 + SIGINT; /* terminated by a signal */
4382 return pid; 4382 return pid;
4383 } 4383 }
4384 GetExitCodeProcess(proclist[idx], &win_status); 4384 GetExitCodeProcess(proclist[idx], &win_status);
4385 pid = pidlist[idx]; 4385 pid = pidlist[idx];
4386 free(pidlist); 4386 free(pidlist);
4387 free(proclist); 4387 free(proclist);
4388 *status = (int)win_status; 4388 *status = (int)win_status << 8;
4389 return pid; 4389 return pid;
4390} 4390}
4391#define waitpid(p, s, f) waitpid_child(s, f) 4391#define waitpid(p, s, f) waitpid_child(s, f)