diff --git a/kernel/src/process/wait.rs b/kernel/src/process/wait.rs index 4e8b6a8a3..8b5b827d3 100644 --- a/kernel/src/process/wait.rs +++ b/kernel/src/process/wait.rs @@ -21,6 +21,9 @@ bitflags! { const WEXITED = 0x4; const WCONTINUED = 0x8; const WNOWAIT = 0x01000000; + const WNOTHREAD = 0x20000000; + const WALL = 0x40000000; + const WCLONE = 0x80000000; } } diff --git a/test/apps/clone3/clone_exit_signal.c b/test/apps/clone3/clone_exit_signal.c index 5c339f9e4..3ff2f0c64 100644 --- a/test/apps/clone3/clone_exit_signal.c +++ b/test/apps/clone3/clone_exit_signal.c @@ -46,7 +46,8 @@ int main(int argc, char *argv[]) * then the parent process must specify the __WALL or __WCLONE * options when waiting for the child with wait(2). */ - waitpid(pid, NULL, __WALL); + if (waitpid(pid, NULL, __WALL) < 0) + err(EXIT_FAILURE, "cannot wait child process"); if (child_exit_recv != 1) errx(EXIT_FAILURE, "did not receive exit signal from child");