From 7bc3efa4f0c7608723d301bda5ee006a0f6141fe Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Fri, 28 Oct 2016 12:43:22 +0100 Subject: 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(). --- shell/ash.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'shell') 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) sigmode[signo - 1] = S_HARD_IGN; } +#if !ENABLE_PLATFORM_MINGW32 /* * Only one usage site - in setsignal() */ @@ -3616,8 +3617,6 @@ setsignal(int signo) char cur_act, new_act; struct sigaction act; - if (ENABLE_PLATFORM_MINGW32) - return; t = trap[signo]; new_act = S_DFL; if (t != NULL) { /* trap for this sig is set */ @@ -3707,6 +3706,9 @@ setsignal(int signo) *t = new_act; } +#else +#define setsignal(s) +#endif /* mode flags for set_curjob */ #define CUR_DELETE 2 @@ -4224,7 +4226,9 @@ waitpid_child(int *status, int wait_flags) return pid; } #define waitpid(p, s, f) waitpid_child(s, f) -#endif +#define wait_block_or_sig(s, f) waitpid_child(s, f) + +#else static int wait_block_or_sig(int *status, int wait_flags) @@ -4251,6 +4255,7 @@ wait_block_or_sig(int *status, int wait_flags) return pid; } +#endif static int -- cgit v1.2.3-55-g6feb