From 2c80f1e46fbd6808b80bee9b7fbbb24c11afd29d Mon Sep 17 00:00:00 2001 From: Yuhao Zhou Date: Mon, 8 Apr 2019 23:42:19 +0800 Subject: [PATCH] Update ucore/exit for rcore. --- ucore/src/exit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ucore/src/exit.c b/ucore/src/exit.c index c3ac5f8..d72c05e 100644 --- a/ucore/src/exit.c +++ b/ucore/src/exit.c @@ -24,8 +24,8 @@ main(void) { assert(pid > 0); cprintf("I am the parent, waiting now..\n"); - assert(waitpid(pid, &code) == 0 && code == magic); - assert(waitpid(pid, &code) != 0 && wait() != 0); + assert(waitpid(pid, &code) > 0 && code == magic); + assert(waitpid(pid, &code) <= 0 && wait() <= 0); cprintf("waitpid %d ok.\n", pid); cprintf("exit pass.\n");