diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index ea7dafec084..fa7d364681d 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -1054,6 +1054,10 @@ linux_wait4(struct thread *td, struct linux_wait4_args *args) LINUX_WCONTINUED | __WCLONE | __WNOTHREAD | __WALL)) return (EINVAL); + /* -INT_MIN is not defined. */ + if (args->pid == INT_MIN) + return (ESRCH); + options = 0; linux_to_bsd_waitopts(args->options, &options);