Index: sys/compat/linux/linux_misc.c =================================================================== --- sys/compat/linux/linux_misc.c +++ sys/compat/linux/linux_misc.c @@ -1055,7 +1055,7 @@ int linux_wait4(struct thread *td, struct linux_wait4_args *args) { - int options, id, idtype; + int error, options, id, idtype; if (args->options & ~(LINUX_WUNTRACED | LINUX_WNOHANG | LINUX_WCONTINUED | __WCLONE | __WNOTHREAD | __WALL)) @@ -1077,6 +1077,11 @@ } else if (args->pid < 0) { idtype = P_PGID; id = (id_t)-args->pid; + } else if (args->pid == 0) { + idtype = P_PGID; + error = kern_getpgid(td, args->pid, &id); + if (error != 0) + return (error); } else { idtype = P_PID; id = (id_t)args->pid;