mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-22 17:03:23 +00:00
Fix clone_exit_signal
test
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
768b182aba
commit
19b13d88e2
@ -21,6 +21,9 @@ bitflags! {
|
|||||||
const WEXITED = 0x4;
|
const WEXITED = 0x4;
|
||||||
const WCONTINUED = 0x8;
|
const WCONTINUED = 0x8;
|
||||||
const WNOWAIT = 0x01000000;
|
const WNOWAIT = 0x01000000;
|
||||||
|
const WNOTHREAD = 0x20000000;
|
||||||
|
const WALL = 0x40000000;
|
||||||
|
const WCLONE = 0x80000000;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,7 +46,8 @@ int main(int argc, char *argv[])
|
|||||||
* then the parent process must specify the __WALL or __WCLONE
|
* then the parent process must specify the __WALL or __WCLONE
|
||||||
* options when waiting for the child with wait(2).
|
* 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)
|
if (child_exit_recv != 1)
|
||||||
errx(EXIT_FAILURE, "did not receive exit signal from child");
|
errx(EXIT_FAILURE, "did not receive exit signal from child");
|
||||||
|
Reference in New Issue
Block a user