mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 23:27:35 +00:00
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.
This commit is contained in:
parent
5163c5cc63
commit
65961d3ffc
1 changed files with 1 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue