summaryrefslogtreecommitdiff
path: root/src/init/main.c
diff options
context:
space:
mode:
authordzwdz2021-08-18 20:23:59 +0200
committerdzwdz2021-08-18 20:23:59 +0200
commitc0a5b44bc8261dec6d4ffaadb244ecbff962719b (patch)
tree64043f4c174b1695541f4de2ee845681b14e300e /src/init/main.c
parent349420c51fe05bfb23b6eb4d30aa1aad034d3c33 (diff)
await() 1: wait for child to die, without message passing
The length is a int, because the syscall will have a signed output. A negative return value will mean an error (such as when it gets called by a childless process).
Diffstat (limited to 'src/init/main.c')
-rw-r--r--src/init/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/init/main.c b/src/init/main.c
index c6d19a3..4298516 100644
--- a/src/init/main.c
+++ b/src/init/main.c
@@ -22,6 +22,10 @@ int main() {
if (_syscall_fork() > 0) {
_syscall_debuglog("parent ",
sizeof("parent ") - 1);
+
+ _syscall_await(NULL, NULL);
+ _syscall_debuglog("death ",
+ sizeof("death ") - 1);
} else {
_syscall_debuglog("child ",
sizeof("child ") - 1);