Index: sys/compat/linux/linux_misc.c =================================================================== --- sys/compat/linux/linux_misc.c +++ sys/compat/linux/linux_misc.c @@ -1055,6 +1055,7 @@ int linux_wait4(struct thread *td, struct linux_wait4_args *args) { + struct proc *p; int options, id, idtype; if (args->options & ~(LINUX_WUNTRACED | LINUX_WNOHANG | @@ -1084,6 +1085,12 @@ } else if (args->pid < 0) { idtype = P_PGID; id = (id_t)-args->pid; + } else if (args->pid == 0) { + idtype = P_PGID; + p = td->td_proc; + PROC_LOCK(p); + id = p->p_pgrp->pg_id; + PROC_UNLOCK(p); } else { idtype = P_PID; id = (id_t)args->pid;