GC WOPTSCHECKED
This commit is contained in:
parent
a664a38e53
commit
e67c618e35
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: linux_misc.c,v 1.232 2016/08/31 08:12:44 njoly Exp $ */
|
/* $NetBSD: linux_misc.c,v 1.233 2016/11/10 17:00:51 christos Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1995, 1998, 1999, 2008 The NetBSD Foundation, Inc.
|
* Copyright (c) 1995, 1998, 1999, 2008 The NetBSD Foundation, Inc.
|
||||||
@ -57,7 +57,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.232 2016/08/31 08:12:44 njoly Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.233 2016/11/10 17:00:51 christos Exp $");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
@ -223,10 +223,10 @@ linux_sys_wait4(struct lwp *l, const struct linux_sys_wait4_args *uap, register_
|
|||||||
proc_t *p;
|
proc_t *p;
|
||||||
|
|
||||||
linux_options = SCARG(uap, options);
|
linux_options = SCARG(uap, options);
|
||||||
options = WOPTSCHECKED;
|
|
||||||
if (linux_options & ~(LINUX_WAIT4_KNOWNFLAGS))
|
if (linux_options & ~(LINUX_WAIT4_KNOWNFLAGS))
|
||||||
return (EINVAL);
|
return (EINVAL);
|
||||||
|
|
||||||
|
options = 0;
|
||||||
if (linux_options & LINUX_WAIT4_WNOHANG)
|
if (linux_options & LINUX_WAIT4_WNOHANG)
|
||||||
options |= WNOHANG;
|
options |= WNOHANG;
|
||||||
if (linux_options & LINUX_WAIT4_WUNTRACED)
|
if (linux_options & LINUX_WAIT4_WUNTRACED)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: linux32_wait.c,v 1.11 2009/11/04 21:23:03 rmind Exp $ */
|
/* $NetBSD: linux32_wait.c,v 1.12 2016/11/10 17:00:51 christos Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
|
* Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
|
||||||
@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
|
|
||||||
__KERNEL_RCSID(0, "$NetBSD: linux32_wait.c,v 1.11 2009/11/04 21:23:03 rmind Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: linux32_wait.c,v 1.12 2016/11/10 17:00:51 christos Exp $");
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
@ -105,10 +105,10 @@ linux32_sys_wait4(struct lwp *l, const struct linux32_sys_wait4_args *uap, regis
|
|||||||
proc_t *p;
|
proc_t *p;
|
||||||
|
|
||||||
linux_options = SCARG(uap, options);
|
linux_options = SCARG(uap, options);
|
||||||
options = WOPTSCHECKED;
|
|
||||||
if (linux_options & ~(LINUX_WAIT4_KNOWNFLAGS))
|
if (linux_options & ~(LINUX_WAIT4_KNOWNFLAGS))
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
||||||
|
options = 0;
|
||||||
if (linux_options & LINUX_WAIT4_WNOHANG)
|
if (linux_options & LINUX_WAIT4_WNOHANG)
|
||||||
options |= WNOHANG;
|
options |= WNOHANG;
|
||||||
if (linux_options & LINUX_WAIT4_WUNTRACED)
|
if (linux_options & LINUX_WAIT4_WUNTRACED)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: osf1_misc.c,v 1.86 2011/07/22 10:02:08 njoly Exp $ */
|
/* $NetBSD: osf1_misc.c,v 1.87 2016/11/10 17:00:51 christos Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1999 Christopher G. Demetriou. All rights reserved.
|
* Copyright (c) 1999 Christopher G. Demetriou. All rights reserved.
|
||||||
@ -58,7 +58,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: osf1_misc.c,v 1.86 2011/07/22 10:02:08 njoly Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: osf1_misc.c,v 1.87 2016/11/10 17:00:51 christos Exp $");
|
||||||
|
|
||||||
#if defined(_KERNEL_OPT)
|
#if defined(_KERNEL_OPT)
|
||||||
#include "opt_syscall_debug.h"
|
#include "opt_syscall_debug.h"
|
||||||
@ -406,7 +406,7 @@ osf1_sys_wait4(struct lwp *l, const struct osf1_sys_wait4_args *uap, register_t
|
|||||||
if (leftovers != 0)
|
if (leftovers != 0)
|
||||||
return (EINVAL);
|
return (EINVAL);
|
||||||
|
|
||||||
error = do_sys_wait(&pid, &status, options | WOPTSCHECKED,
|
error = do_sys_wait(&pid, &status, options,
|
||||||
SCARG(uap, rusage) != NULL ? &netbsd_rusage : NULL);
|
SCARG(uap, rusage) != NULL ? &netbsd_rusage : NULL);
|
||||||
|
|
||||||
retval[0] = pid;
|
retval[0] = pid;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: svr4_misc.c,v 1.156 2014/09/05 09:21:55 matt Exp $ */
|
/* $NetBSD: svr4_misc.c,v 1.157 2016/11/10 17:00:51 christos Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1994, 2008 The NetBSD Foundation, Inc.
|
* Copyright (c) 1994, 2008 The NetBSD Foundation, Inc.
|
||||||
@ -37,7 +37,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: svr4_misc.c,v 1.156 2014/09/05 09:21:55 matt Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: svr4_misc.c,v 1.157 2016/11/10 17:00:51 christos Exp $");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
@ -1030,7 +1030,7 @@ svr4_sys_waitsys(struct lwp *l, const struct svr4_sys_waitsys_args *uap, registe
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Translate options */
|
/* Translate options */
|
||||||
options = WOPTSCHECKED;
|
options = 0;
|
||||||
if (SCARG(uap, options) & SVR4_WNOWAIT)
|
if (SCARG(uap, options) & SVR4_WNOWAIT)
|
||||||
options |= WNOWAIT;
|
options |= WNOWAIT;
|
||||||
if (SCARG(uap, options) & SVR4_WNOHANG)
|
if (SCARG(uap, options) & SVR4_WNOHANG)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: svr4_32_misc.c,v 1.76 2016/02/28 23:24:36 khorben Exp $ */
|
/* $NetBSD: svr4_32_misc.c,v 1.77 2016/11/10 17:00:51 christos Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1994, 2008 The NetBSD Foundation, Inc.
|
* Copyright (c) 1994, 2008 The NetBSD Foundation, Inc.
|
||||||
@ -37,7 +37,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: svr4_32_misc.c,v 1.76 2016/02/28 23:24:36 khorben Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: svr4_32_misc.c,v 1.77 2016/11/10 17:00:51 christos Exp $");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
@ -1044,7 +1044,7 @@ svr4_32_sys_waitsys(struct lwp *l, const struct svr4_32_sys_waitsys_args *uap, r
|
|||||||
SCARG(uap, info), SCARG(uap, options)));
|
SCARG(uap, info), SCARG(uap, options)));
|
||||||
|
|
||||||
/* Translate options */
|
/* Translate options */
|
||||||
options = WOPTSCHECKED;
|
options = 0;
|
||||||
if (SCARG(uap, options) & SVR4_WNOWAIT)
|
if (SCARG(uap, options) & SVR4_WNOWAIT)
|
||||||
options |= WNOWAIT;
|
options |= WNOWAIT;
|
||||||
if (SCARG(uap, options) & SVR4_WNOHANG)
|
if (SCARG(uap, options) & SVR4_WNOHANG)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user