diff options
author | Ron Yorston <rmy@pobox.com> | 2023-04-03 08:28:41 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2023-04-03 08:31:56 +0100 |
commit | 1b2ee3667543b2588446dba6655720eb929bfe03 (patch) | |
tree | 6a6b13a678661fa8d193b89ca360024cfc0879b9 /networking/httpd.c | |
parent | ef02a404777a782757a65234e037a24c64ac7c96 (diff) | |
download | busybox-w32-1b2ee3667543b2588446dba6655720eb929bfe03.tar.gz busybox-w32-1b2ee3667543b2588446dba6655720eb929bfe03.tar.bz2 busybox-w32-1b2ee3667543b2588446dba6655720eb929bfe03.zip |
win32: add fake HUP and QUIT signals
It's fairly common for shell scripts to trap this set of signals:
EXIT HUP INT QUIT TERM (or the numeric equivalent: 0 1 2 3 15)
Add definitions for SIGHUP and SIGQUIT. We don't take any action
if traps are defined for them, but at least scripts won't fail.
(GitHub issue #303)
Diffstat (limited to '')
-rw-r--r-- | networking/httpd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/networking/httpd.c b/networking/httpd.c index 59b4a769c..b32498ddb 100644 --- a/networking/httpd.c +++ b/networking/httpd.c | |||
@@ -2869,7 +2869,7 @@ static void mingw_daemonize(char **argv) | |||
2869 | } | 2869 | } |
2870 | #endif | 2870 | #endif |
2871 | 2871 | ||
2872 | #ifdef SIGHUP | 2872 | #if !ENABLE_PLATFORM_MINGW32 |
2873 | static void sighup_handler(int sig UNUSED_PARAM) | 2873 | static void sighup_handler(int sig UNUSED_PARAM) |
2874 | { | 2874 | { |
2875 | int sv = errno; | 2875 | int sv = errno; |
@@ -3034,7 +3034,7 @@ int httpd_main(int argc UNUSED_PARAM, char **argv) | |||
3034 | #endif | 3034 | #endif |
3035 | 3035 | ||
3036 | parse_conf(DEFAULT_PATH_HTTPD_CONF, FIRST_PARSE); | 3036 | parse_conf(DEFAULT_PATH_HTTPD_CONF, FIRST_PARSE); |
3037 | #ifdef SIGHUP | 3037 | #if !ENABLE_PLATFORM_MINGW32 |
3038 | if (!(opt & OPT_INETD)) | 3038 | if (!(opt & OPT_INETD)) |
3039 | signal(SIGHUP, sighup_handler); | 3039 | signal(SIGHUP, sighup_handler); |
3040 | #endif | 3040 | #endif |