162187b41SDavid Xu.\" Copyright (c) 2008 Ed Schouten <ed@FreeBSD.org> 262187b41SDavid Xu.\" All rights reserved. 362187b41SDavid Xu.\" 462187b41SDavid Xu.\" Redistribution and use in source and binary forms, with or without 562187b41SDavid Xu.\" modification, are permitted provided that the following conditions 662187b41SDavid Xu.\" are met: 762187b41SDavid Xu.\" 1. Redistributions of source code must retain the above copyright 862187b41SDavid Xu.\" notice, this list of conditions and the following disclaimer. 962187b41SDavid Xu.\" 2. Redistributions in binary form must reproduce the above copyright 1062187b41SDavid Xu.\" notice, this list of conditions and the following disclaimer in the 1162187b41SDavid Xu.\" documentation and/or other materials provided with the distribution. 1262187b41SDavid Xu.\" 1362187b41SDavid Xu.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1462187b41SDavid Xu.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1562187b41SDavid Xu.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1662187b41SDavid Xu.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 1762187b41SDavid Xu.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1862187b41SDavid Xu.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 1962187b41SDavid Xu.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2062187b41SDavid Xu.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2162187b41SDavid Xu.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2262187b41SDavid Xu.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2362187b41SDavid Xu.\" SUCH DAMAGE. 2462187b41SDavid Xu.\" 2562187b41SDavid Xu.\" Portions of this text are reprinted and reproduced in electronic form 2662187b41SDavid Xu.\" from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- 2762187b41SDavid Xu.\" Portable Operating System Interface (POSIX), The Open Group Base 2862187b41SDavid Xu.\" Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of 2962187b41SDavid Xu.\" Electrical and Electronics Engineers, Inc and The Open Group. In the 3062187b41SDavid Xu.\" event of any discrepancy between this version and the original IEEE and 3162187b41SDavid Xu.\" The Open Group Standard, the original IEEE and The Open Group Standard is 3262187b41SDavid Xu.\" the referee document. The original Standard can be obtained online at 3362187b41SDavid Xu.\" http://www.opengroup.org/unix/online.html. 3462187b41SDavid Xu.\" 35*a725a7a2SKonstantin Belousov.Dd March 4, 2024 3662187b41SDavid Xu.Dt POSIX_SPAWNATTR_GETFLAGS 3 3762187b41SDavid Xu.Os 3862187b41SDavid Xu.Sh NAME 3962187b41SDavid Xu.Nm posix_spawnattr_getflags , 4062187b41SDavid Xu.Nm posix_spawnattr_setflags 4162187b41SDavid Xu.Nd "get and set the spawn-flags attribute of a spawn attributes object" 4262187b41SDavid Xu.Sh LIBRARY 4362187b41SDavid Xu.Lb libc 4462187b41SDavid Xu.Sh SYNOPSIS 4562187b41SDavid Xu.In spawn.h 4662187b41SDavid Xu.Ft int 4762187b41SDavid Xu.Fn posix_spawnattr_getflags "const posix_spawnattr_t *restrict attr" "short *restrict flags" 4862187b41SDavid Xu.Ft int 4962187b41SDavid Xu.Fn posix_spawnattr_setflags "posix_spawnattr_t *attr" "short flags" 5062187b41SDavid Xu.Sh DESCRIPTION 5162187b41SDavid XuThe 5262187b41SDavid Xu.Fn posix_spawnattr_getflags 5362187b41SDavid Xufunction obtains the value of the spawn-flags attribute from the 5462187b41SDavid Xuattributes object referenced by 5562187b41SDavid Xu.Fa attr . 5662187b41SDavid Xu.Pp 5762187b41SDavid XuThe 5862187b41SDavid Xu.Fn posix_spawnattr_setflags 5962187b41SDavid Xufunction sets the spawn-flags attribute in an initialized 6062187b41SDavid Xuattributes object referenced by 6162187b41SDavid Xu.Fa attr . 6262187b41SDavid Xu.Pp 6362187b41SDavid XuThe spawn-flags attribute is used to indicate which process attributes 6462187b41SDavid Xuare to be changed in the new process image when invoking 6562187b41SDavid Xu.Fn posix_spawn 6662187b41SDavid Xuor 6762187b41SDavid Xu.Fn posix_spawnp . 6862187b41SDavid XuIt is the bitwise-inclusive OR of zero or more of the following flags 6962187b41SDavid Xu(see 7062187b41SDavid Xu.Fn posix_spawn ) : 719ee2158bSJoel Dahl.Bl -tag -width "POSIX_SPAWN_SETSCHEDPARAM" -offset indent 7262187b41SDavid Xu.It Dv POSIX_SPAWN_RESETIDS 7362187b41SDavid Xu.It Dv POSIX_SPAWN_SETPGROUP 7462187b41SDavid Xu.It Dv POSIX_SPAWN_SETSIGDEF 7562187b41SDavid Xu.It Dv POSIX_SPAWN_SETSIGMASK 7662187b41SDavid Xu.It Dv POSIX_SPAWN_SETSCHEDPARAM 7762187b41SDavid Xu.It Dv POSIX_SPAWN_SETSCHEDULER 78*a725a7a2SKonstantin Belousov.It Dv POSIX_SPAWN_DISABLE_ASLR_NP 7962187b41SDavid Xu.El 8062187b41SDavid Xu.Pp 8162187b41SDavid XuThese flags are defined in 8262187b41SDavid Xu.In spawn.h . 8362187b41SDavid XuThe default value of this attribute is as if no flags were set. 8462187b41SDavid Xu.Sh RETURN VALUES 8562187b41SDavid XuThe 8662187b41SDavid Xu.Fn posix_spawnattr_getflags 8780ac36c3SKonstantin Belousovfunction returns zero. 8880ac36c3SKonstantin BelousovThe 8962187b41SDavid Xu.Fn posix_spawnattr_setflags 9080ac36c3SKonstantin Belousovfunction returns zero on success, and 9180ac36c3SKonstantin Belousov.Er EINVAL 9280ac36c3SKonstantin Belousovon failure due to invalid flag specified. 9362187b41SDavid Xu.Sh SEE ALSO 9462187b41SDavid Xu.Xr posix_spawn 3 , 9562187b41SDavid Xu.Xr posix_spawnattr_destroy 3 , 9662187b41SDavid Xu.Xr posix_spawnattr_init 3 , 9762187b41SDavid Xu.Xr posix_spawnp 3 9862187b41SDavid Xu.Sh STANDARDS 9962187b41SDavid XuThe 10062187b41SDavid Xu.Fn posix_spawnattr_getflags 10162187b41SDavid Xuand 10262187b41SDavid Xu.Fn posix_spawnattr_setflags 10362187b41SDavid Xufunctions conform to 10462187b41SDavid Xu.St -p1003.1-2001 . 10562187b41SDavid Xu.Sh HISTORY 10662187b41SDavid XuThe 10762187b41SDavid Xu.Fn posix_spawnattr_getflags 10862187b41SDavid Xuand 10962187b41SDavid Xu.Fn posix_spawnattr_setflags 11062187b41SDavid Xufunctions first appeared in 11162187b41SDavid Xu.Fx 8.0 . 11262187b41SDavid Xu.Sh AUTHORS 11318c5321dSBaptiste Daroussin.An \&Ed Schouten Aq Mt ed@FreeBSD.org 114