mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 20:45:14 +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
Notes:
sideshowbarker
2024-07-19 09:46:31 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/65961d3ffc4
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
Reference in a new issue