aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2023-05-23 10:57:56 +0100
committerRon Yorston <rmy@pobox.com>2023-05-23 10:57:56 +0100
commit89aa9d783c535670c6aed1d32c8740b7474cca00 (patch)
tree52a494ad5f8a89fbdb5ad2a6155a62d7d3a6a024 /include
parentc2c0cfbeb6f07fa3257a60760d5c8a5382cee6e9 (diff)
downloadbusybox-w32-89aa9d783c535670c6aed1d32c8740b7474cca00.tar.gz
busybox-w32-89aa9d783c535670c6aed1d32c8740b7474cca00.tar.bz2
busybox-w32-89aa9d783c535670c6aed1d32c8740b7474cca00.zip
win32: changes to signal handling
Use an exit code of the form (signal << 24) when a process exits due to a signal. This replaces the previous use of (signal + 128). This makes it easier to distinguish exit codes from signals. Allow kill(2) to handle all defined signals, not just EXIT, TERM and KILL. The kill and timeout applets now accept any defined signals. Convert certain Windows status codes Unix-style signal codes. In ash: - Exit as if with SIGINT in raise_interrupt() rather than call raise(SIGINT). The latter returns an exit code of 3. - Detect if a child process exits as if with SIGINT. If not and if the parent is an interactive top-level shell, reset pending_int. This prevents the parent from seeing an INT if the child hasn't reported it exited due to INT. (Probably due to it being an interactive shell.) Costs 132-136 bytes.
Diffstat (limited to 'include')
-rw-r--r--include/mingw.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/mingw.h b/include/mingw.h
index 6204ded6d..f94804d91 100644
--- a/include/mingw.h
+++ b/include/mingw.h
@@ -540,7 +540,8 @@ int mingw_execve(const char *cmd, char *const *argv, char *const *envp);
540 540
541#define has_dos_drive_prefix(path) (isalpha(*(path)) && (path)[1] == ':') 541#define has_dos_drive_prefix(path) (isalpha(*(path)) && (path)[1] == ':')
542 542
543int kill_SIGTERM_by_handle(HANDLE process); 543int kill_signal_by_handle(HANDLE process, int sig);
544int FAST_FUNC is_valid_signal(int number);
544 545
545#define find_mount_point(n, s) find_mount_point(n) 546#define find_mount_point(n, s) find_mount_point(n)
546 547