From 65961d3ffc4bdb62fe6cf04abbe3ffdb8f1c8bce Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 27 Jan 2020 20:47:56 +0100 Subject: [PATCH] LibC: Add WSTOPSIG macro This macro can be used on the "status" output from sys$waitpid() to find out which signal caused the waitee process to stop. Fixes #794. --- Libraries/LibC/sys/wait.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Libraries/LibC/sys/wait.h b/Libraries/LibC/sys/wait.h index 274ef3cd77..71b03c8430 100644 --- a/Libraries/LibC/sys/wait.h +++ b/Libraries/LibC/sys/wait.h @@ -32,6 +32,7 @@ __BEGIN_DECLS #define WEXITSTATUS(status) (((status)&0xff00) >> 8) +#define WSTOPSIG(status) WEXITSTATUS(status) #define WTERMSIG(status) ((status)&0x7f) #define WIFEXITED(status) (WTERMSIG(status) == 0) #define WIFSTOPPED(status) (((status) & 0xff) == 0x7f)