summaryrefslogtreecommitdiff
path: root/src/kernel/syscalls.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/syscalls.c')
-rw-r--r--src/kernel/syscalls.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/kernel/syscalls.c b/src/kernel/syscalls.c
index 01d42a0..f3161e5 100644
--- a/src/kernel/syscalls.c
+++ b/src/kernel/syscalls.c
@@ -23,10 +23,12 @@ int _syscall_await(void) {
// find any already dead children
for (struct process *iter = process_current->child;
iter; iter = iter->sibling) {
- if (iter->state == PS_DEAD && !iter->noreap)
+ if (iter->state == PS_DEAD && !iter->noreap) {
+ assert(!iter->noreap);
SYSCALL_RETURN(process_try2collect(iter));
- if (iter->state != PS_DEADER)
+ } else {
has_children = true;
+ }
}
if (!has_children) {