diff --git a/src/sys/syscalls/waitpid.c b/src/sys/syscalls/waitpid.c index 228e0648..559063c1 100644 --- a/src/sys/syscalls/waitpid.c +++ b/src/sys/syscalls/waitpid.c @@ -92,8 +92,9 @@ syscallret syscall_waitpid(pid_t pid, int *status, int options){ else{ proc->child = child->sibling; } - - *status = child->status; // XXX safer way of doing this + + if(status) + *status = child->status; // XXX safer way of doing this // the pointer to the last remaining thread is is proc->threads