mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-04 17:44:14 +08:00
tools/nolibc: add helpers for wait() signal exits
These are useful for users and will also be used in an upcoming testcase. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
This commit is contained in:
parent
00b7262896
commit
8c934d4822
@ -97,6 +97,8 @@
|
||||
/* Macros used on waitpid()'s return status */
|
||||
#define WEXITSTATUS(status) (((status) & 0xff00) >> 8)
|
||||
#define WIFEXITED(status) (((status) & 0x7f) == 0)
|
||||
#define WTERMSIG(status) ((status) & 0x7f)
|
||||
#define WIFSIGNALED(status) ((status) - 1 < 0xff)
|
||||
|
||||
/* waitpid() flags */
|
||||
#define WNOHANG 1
|
||||
|
Loading…
Reference in New Issue
Block a user