diff options
author | Ron Yorston <rmy@pobox.com> | 2016-10-28 12:43:22 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2016-10-28 12:43:22 +0100 |
commit | 7bc3efa4f0c7608723d301bda5ee006a0f6141fe (patch) | |
tree | 9ca631a4feb04cfe2707a8fe973f205d6113021d | |
parent | d3b0f5df93a7955ff1b9a56d2d5ebd7bc2ef5708 (diff) | |
download | busybox-w32-7bc3efa4f0c7608723d301bda5ee006a0f6141fe.tar.gz busybox-w32-7bc3efa4f0c7608723d301bda5ee006a0f6141fe.tar.bz2 busybox-w32-7bc3efa4f0c7608723d301bda5ee006a0f6141fe.zip |
Post-merge fixes
Signal handling has never really worked on WIN32 so:
- don't bother compiling signal_handler() or setsignal();
- use waitpid_child() instead of new function wait_block_or_sig().
-rw-r--r-- | shell/ash.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/shell/ash.c b/shell/ash.c index abbc0cd78..dd320355e 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -3581,6 +3581,7 @@ ignoresig(int signo) | |||
3581 | sigmode[signo - 1] = S_HARD_IGN; | 3581 | sigmode[signo - 1] = S_HARD_IGN; |
3582 | } | 3582 | } |
3583 | 3583 | ||
3584 | #if !ENABLE_PLATFORM_MINGW32 | ||
3584 | /* | 3585 | /* |
3585 | * Only one usage site - in setsignal() | 3586 | * Only one usage site - in setsignal() |
3586 | */ | 3587 | */ |
@@ -3616,8 +3617,6 @@ setsignal(int signo) | |||
3616 | char cur_act, new_act; | 3617 | char cur_act, new_act; |
3617 | struct sigaction act; | 3618 | struct sigaction act; |
3618 | 3619 | ||
3619 | if (ENABLE_PLATFORM_MINGW32) | ||
3620 | return; | ||
3621 | t = trap[signo]; | 3620 | t = trap[signo]; |
3622 | new_act = S_DFL; | 3621 | new_act = S_DFL; |
3623 | if (t != NULL) { /* trap for this sig is set */ | 3622 | if (t != NULL) { /* trap for this sig is set */ |
@@ -3707,6 +3706,9 @@ setsignal(int signo) | |||
3707 | 3706 | ||
3708 | *t = new_act; | 3707 | *t = new_act; |
3709 | } | 3708 | } |
3709 | #else | ||
3710 | #define setsignal(s) | ||
3711 | #endif | ||
3710 | 3712 | ||
3711 | /* mode flags for set_curjob */ | 3713 | /* mode flags for set_curjob */ |
3712 | #define CUR_DELETE 2 | 3714 | #define CUR_DELETE 2 |
@@ -4224,7 +4226,9 @@ waitpid_child(int *status, int wait_flags) | |||
4224 | return pid; | 4226 | return pid; |
4225 | } | 4227 | } |
4226 | #define waitpid(p, s, f) waitpid_child(s, f) | 4228 | #define waitpid(p, s, f) waitpid_child(s, f) |
4227 | #endif | 4229 | #define wait_block_or_sig(s, f) waitpid_child(s, f) |
4230 | |||
4231 | #else | ||
4228 | 4232 | ||
4229 | static int | 4233 | static int |
4230 | wait_block_or_sig(int *status, int wait_flags) | 4234 | wait_block_or_sig(int *status, int wait_flags) |
@@ -4251,6 +4255,7 @@ wait_block_or_sig(int *status, int wait_flags) | |||
4251 | 4255 | ||
4252 | return pid; | 4256 | return pid; |
4253 | } | 4257 | } |
4258 | #endif | ||
4254 | 4259 | ||
4255 | 4260 | ||
4256 | static int | 4261 | static int |