diff options
author | dzwdz | 2021-08-22 11:35:00 +0200 |
---|---|---|
committer | dzwdz | 2021-08-22 11:35:00 +0200 |
commit | 5aaf1d48ec052d1582eae2c7642adc8829a6711b (patch) | |
tree | 40745bc8d62035b812c6f36f0629c13221ae42e3 /src/init | |
parent | c0a5b44bc8261dec6d4ffaadb244ecbff962719b (diff) |
await() 2: pass the exit message
Diffstat (limited to 'src/init')
-rw-r--r-- | src/init/main.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/init/main.c b/src/init/main.c index 4298516..3403a3b 100644 --- a/src/init/main.c +++ b/src/init/main.c @@ -14,6 +14,9 @@ const char *multipageify(const char *str) { } int main() { + char buf[64]; + int len = 64; + // try to print a string crossing page boundaries _syscall_debuglog( multipageify("I cross pages. "), @@ -23,12 +26,14 @@ int main() { _syscall_debuglog("parent ", sizeof("parent ") - 1); - _syscall_await(NULL, NULL); - _syscall_debuglog("death ", - sizeof("death ") - 1); + len = _syscall_await(buf, 64); + _syscall_debuglog(buf, len); } else { _syscall_debuglog("child ", sizeof("child ") - 1); + _syscall_exit( + multipageify("this is the child's exit message!"), + sizeof("this is the child's exit message!") - 1); } _syscall_exit("bye from init! ", |