aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2021-09-21 12:52:24 +0100
committerRon Yorston <rmy@pobox.com>2021-09-21 13:24:00 +0100
commitdf34f5e92b1d10f0bb858d2ea6e8c249e87ac593 (patch)
treef90208eb2d6f3710833958f67e6101fc2fa85806 /include
parent48ddce5e9a063d89689ffe4be1680767186e13ee (diff)
downloadbusybox-w32-df34f5e92b1d10f0bb858d2ea6e8c249e87ac593.tar.gz
busybox-w32-df34f5e92b1d10f0bb858d2ea6e8c249e87ac593.tar.bz2
busybox-w32-df34f5e92b1d10f0bb858d2ea6e8c249e87ac593.zip
ash: improve signal handling
Allow waitpid() to detect SIGTERM/SIGKILL by checking the (Windows) status returned by GetExitCodeProcess() and updating the Unix status to suit. This allows ash to detect when a process has been 'signalled'. Provide our own implementation of strsignal(3) which returns expanded text for SIGTERM/SIGKILL. Costs 192 bytes.
Diffstat (limited to 'include')
-rw-r--r--include/mingw.h1
-rw-r--r--include/platform.h1
2 files changed, 1 insertions, 1 deletions
diff --git a/include/mingw.h b/include/mingw.h
index d48ad3814..74a65116c 100644
--- a/include/mingw.h
+++ b/include/mingw.h
@@ -210,6 +210,7 @@ int unsetenv(const char *env);
210 */ 210 */
211char *strndup(char const *s, size_t n); 211char *strndup(char const *s, size_t n);
212char *mingw_strerror(int errnum); 212char *mingw_strerror(int errnum);
213char *strsignal(int sig);
213 214
214#define strerror mingw_strerror 215#define strerror mingw_strerror
215 216
diff --git a/include/platform.h b/include/platform.h
index 37e48dcc5..7bb39fd93 100644
--- a/include/platform.h
+++ b/include/platform.h
@@ -473,7 +473,6 @@ typedef unsigned smalluint;
473# undef HAVE_STRCASESTR 473# undef HAVE_STRCASESTR
474# undef HAVE_STRCHRNUL 474# undef HAVE_STRCHRNUL
475# undef HAVE_STRSEP 475# undef HAVE_STRSEP
476# undef HAVE_STRSIGNAL
477# undef HAVE_STRVERSCMP 476# undef HAVE_STRVERSCMP
478#if !defined(__MINGW64_VERSION_MAJOR) 477#if !defined(__MINGW64_VERSION_MAJOR)
479# undef HAVE_VASPRINTF 478# undef HAVE_VASPRINTF