aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2023-09-14 08:09:14 +0100
committerRon Yorston <rmy@pobox.com>2023-09-14 08:09:14 +0100
commit0475b7a649209487269e35cbe49662a33524e6ae (patch)
tree531237e1d8716e7c94fdcd0b2966e2e0cbfc0255 /include
parente3d50157ce21f990c33afdcf8dba8080308ce0f0 (diff)
downloadbusybox-w32-0475b7a649209487269e35cbe49662a33524e6ae.tar.gz
busybox-w32-0475b7a649209487269e35cbe49662a33524e6ae.tar.bz2
busybox-w32-0475b7a649209487269e35cbe49662a33524e6ae.zip
win32: convert exit codes
Add two utility functions to convert Windows process exit codes. - exit_code_to_wait_status() converts to a POSIX wait status. This is used in ash and the implementations of system(3) and mingw_wait3(). - exit_code_to_posix() converts to a POSIX exit code. (Not that POSIX has much to say about them.) As a result it's possible for more applets to report when child processes are killed as if by a signal. 'time', 'drop' and 'su -W', for example. Adds 64-80 bytes.
Diffstat (limited to 'include')
-rw-r--r--include/mingw.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/mingw.h b/include/mingw.h
index 1dcc84bde..6ed9bed4a 100644
--- a/include/mingw.h
+++ b/include/mingw.h
@@ -562,6 +562,8 @@ int mingw_execve(const char *cmd, char *const *argv, char *const *envp);
562BOOL WINAPI kill_child_ctrl_handler(DWORD dwCtrlType); 562BOOL WINAPI kill_child_ctrl_handler(DWORD dwCtrlType);
563int kill_signal_by_handle(HANDLE process, int sig); 563int kill_signal_by_handle(HANDLE process, int sig);
564int FAST_FUNC is_valid_signal(int number); 564int FAST_FUNC is_valid_signal(int number);
565int exit_code_to_wait_status(DWORD win_exit_code);
566int exit_code_to_posix(DWORD win_exit_code);
565 567
566#define find_mount_point(n, s) find_mount_point(n) 568#define find_mount_point(n, s) find_mount_point(n)
567 569