Index: sys/amd64/linux32/linux32_machdep.c =================================================================== --- sys/amd64/linux32/linux32_machdep.c +++ sys/amd64/linux32/linux32_machdep.c @@ -1030,10 +1030,8 @@ (void *)args->rusage); #endif - options = (args->options & (WNOHANG | WUNTRACED)); - /* WLINUXCLONE should be equal to __WCLONE, but we make sure */ - if (args->options & __WCLONE) - options |= WLINUXCLONE; + options = (WNOHANG | WUNTRACED); + linux_to_bsd_waitopts(args->options, &options); if (args->rusage != NULL) rup = &ru; Index: sys/compat/linux/linux_misc.c =================================================================== --- sys/compat/linux/linux_misc.c +++ sys/compat/linux/linux_misc.c @@ -891,17 +891,15 @@ printf(ARGS(waitpid, "%d, %p, %d"), args->pid, (void *)args->status, args->options); #endif + options = (WNOHANG | WUNTRACED); + linux_to_bsd_waitopts(args->options, &options); + /* * this is necessary because the test in kern_wait doesn't work * because we mess with the options here */ - if (args->options & ~(WUNTRACED | WNOHANG | WCONTINUED | __WCLONE)) + if (options & ~(WUNTRACED | WNOHANG | WCONTINUED | WLINUXCLONE)) return (EINVAL); - - options = (args->options & (WNOHANG | WUNTRACED)); - /* WLINUXCLONE should be equal to __WCLONE, but we make sure */ - if (args->options & __WCLONE) - options |= WLINUXCLONE; return (linux_common_wait(td, args->pid, args->status, options, NULL)); } Index: sys/i386/linux/linux_machdep.c =================================================================== --- sys/i386/linux/linux_machdep.c +++ sys/i386/linux/linux_machdep.c @@ -1052,10 +1052,8 @@ (void *)args->rusage); #endif - options = (args->options & (WNOHANG | WUNTRACED)); - /* WLINUXCLONE should be equal to __WCLONE, but we make sure */ - if (args->options & __WCLONE) - options |= WLINUXCLONE; + options = (WNOHANG | WUNTRACED); + linux_to_bsd_waitopts(args->options, &options); if (args->rusage != NULL) rup = &ru;