166492cf0SYuri Pankov.\" 266492cf0SYuri Pankov.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for 366492cf0SYuri Pankov.\" permission to reproduce portions of its copyrighted documentation. 466492cf0SYuri Pankov.\" Original documentation from The Open Group can be obtained online at 566492cf0SYuri Pankov.\" http://www.opengroup.org/bookstore/. 666492cf0SYuri Pankov.\" 766492cf0SYuri Pankov.\" The Institute of Electrical and Electronics Engineers and The Open 866492cf0SYuri Pankov.\" Group, have given us permission to reprint portions of their 966492cf0SYuri Pankov.\" documentation. 1066492cf0SYuri Pankov.\" 1166492cf0SYuri Pankov.\" In the following statement, the phrase ``this text'' refers to portions 1266492cf0SYuri Pankov.\" of the system documentation. 1366492cf0SYuri Pankov.\" 1466492cf0SYuri Pankov.\" Portions of this text are reprinted and reproduced in electronic form 1566492cf0SYuri Pankov.\" in the SunOS Reference Manual, from IEEE Std 1003.1, 2004 Edition, 1666492cf0SYuri Pankov.\" Standard for Information Technology -- Portable Operating System 1766492cf0SYuri Pankov.\" Interface (POSIX), The Open Group Base Specifications Issue 6, 1866492cf0SYuri Pankov.\" Copyright (C) 2001-2004 by the Institute of Electrical and Electronics 1966492cf0SYuri Pankov.\" Engineers, Inc and The Open Group. In the event of any discrepancy 2066492cf0SYuri Pankov.\" between these versions and the original IEEE and The Open Group 2166492cf0SYuri Pankov.\" Standard, the original IEEE and The Open Group Standard is the referee 2266492cf0SYuri Pankov.\" document. The original Standard can be obtained online at 2366492cf0SYuri Pankov.\" http://www.opengroup.org/unix/online.html. 2466492cf0SYuri Pankov.\" 2566492cf0SYuri Pankov.\" This notice shall appear on any product containing this material. 2666492cf0SYuri Pankov.\" 2766492cf0SYuri Pankov.\" The contents of this file are subject to the terms of the 2866492cf0SYuri Pankov.\" Common Development and Distribution License (the "License"). 2966492cf0SYuri Pankov.\" You may not use this file except in compliance with the License. 3066492cf0SYuri Pankov.\" 3166492cf0SYuri Pankov.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 3266492cf0SYuri Pankov.\" or http://www.opensolaris.org/os/licensing. 3366492cf0SYuri Pankov.\" See the License for the specific language governing permissions 3466492cf0SYuri Pankov.\" and limitations under the License. 3566492cf0SYuri Pankov.\" 3666492cf0SYuri Pankov.\" When distributing Covered Code, include this CDDL HEADER in each 3766492cf0SYuri Pankov.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. 3866492cf0SYuri Pankov.\" If applicable, add the following below this CDDL HEADER, with the 3966492cf0SYuri Pankov.\" fields enclosed by brackets "[]" replaced with your own identifying 4066492cf0SYuri Pankov.\" information: Portions Copyright [yyyy] [name of copyright owner] 4166492cf0SYuri Pankov.\" 4266492cf0SYuri Pankov.\" 43c10c16deSRichard Lowe.\" Copyright 1989 AT&T. 44c10c16deSRichard Lowe.\" Portions Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. 4566492cf0SYuri Pankov.\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved. 462b395c3cSAndy Fiddaman.\" Copyright 2014 Garrett D'Amore <garrett@damore.org> 4766492cf0SYuri Pankov.\" Copyright 2015, Joyent, Inc. 48be20269fSAndy Fiddaman.\" Copyright 2024 Oxide Computer Company 4966492cf0SYuri Pankov.\" 50*0250c53aSRobert Mustacchi.Dd June 21, 2024 51be20269fSAndy Fiddaman.Dt EXEC 2 52be20269fSAndy Fiddaman.Os 53be20269fSAndy Fiddaman.Sh NAME 54be20269fSAndy Fiddaman.Nm exec , 55be20269fSAndy Fiddaman.Nm execl , 56be20269fSAndy Fiddaman.Nm execle , 57be20269fSAndy Fiddaman.Nm execlp , 58be20269fSAndy Fiddaman.Nm execv , 59be20269fSAndy Fiddaman.Nm execve , 602b395c3cSAndy Fiddaman.Nm execvp , 61a89c0811SRobert Mustacchi.Nm execvpe , 622b395c3cSAndy Fiddaman.Nm fexecve 63be20269fSAndy Fiddaman.Nd execute a file 64be20269fSAndy Fiddaman.Sh SYNOPSIS 65be20269fSAndy Fiddaman.In unistd.h 66be20269fSAndy Fiddaman.Ft int 67be20269fSAndy Fiddaman.Fo execl 68be20269fSAndy Fiddaman.Fa "const char *path" 69be20269fSAndy Fiddaman.Fa "const char *arg0" 70be20269fSAndy Fiddaman.Fa "..." 71be20269fSAndy Fiddaman.Fa NULL 72be20269fSAndy Fiddaman.Fc 73be20269fSAndy Fiddaman.Ft int 74be20269fSAndy Fiddaman.Fo execv 75be20269fSAndy Fiddaman.Fa "const char *path" 76be20269fSAndy Fiddaman.Fa "char *const argv[]" 77be20269fSAndy Fiddaman.Fc 78be20269fSAndy Fiddaman.Ft int 79be20269fSAndy Fiddaman.Fo execle 80be20269fSAndy Fiddaman.Fa "const char *path" 81be20269fSAndy Fiddaman.Fa "const char *arg0" 82be20269fSAndy Fiddaman.Fa "..." 83be20269fSAndy Fiddaman.Fa NULL 84be20269fSAndy Fiddaman.Fa "char *const envp[]" 85be20269fSAndy Fiddaman.Fc 86be20269fSAndy Fiddaman.Ft int 87be20269fSAndy Fiddaman.Fo execve 88be20269fSAndy Fiddaman.Fa "const char *path" 89be20269fSAndy Fiddaman.Fa "char *const argv[]" 90be20269fSAndy Fiddaman.Fa "char *const envp[]" 91be20269fSAndy Fiddaman.Fc 92be20269fSAndy Fiddaman.Ft int 93be20269fSAndy Fiddaman.Fo execlp 94be20269fSAndy Fiddaman.Fa "const char *file" 95be20269fSAndy Fiddaman.Fa "const char *arg0" 96be20269fSAndy Fiddaman.Fa "..." 97be20269fSAndy Fiddaman.Fa NULL 98be20269fSAndy Fiddaman.Fc 99be20269fSAndy Fiddaman.Ft int 100be20269fSAndy Fiddaman.Fo execvp 101be20269fSAndy Fiddaman.Fa "const char *file" 102be20269fSAndy Fiddaman.Fa "char *const argv[]" 103be20269fSAndy Fiddaman.Fc 1042b395c3cSAndy Fiddaman.Ft int 105a89c0811SRobert Mustacchi.Fo execvpe 106a89c0811SRobert Mustacchi.Fa "const char *file" 107a89c0811SRobert Mustacchi.Fa "char *const argv[]" 108a89c0811SRobert Mustacchi.Fa "char *const envp[]" 109a89c0811SRobert Mustacchi.Fc 110a89c0811SRobert Mustacchi.Ft int 1112b395c3cSAndy Fiddaman.Fo fexecve 1122b395c3cSAndy Fiddaman.Fa "int fd" 1132b395c3cSAndy Fiddaman.Fa "char *const argv[]" 1142b395c3cSAndy Fiddaman.Fa "char *const envp[]" 1152b395c3cSAndy Fiddaman.Fc 116be20269fSAndy Fiddaman.Sh DESCRIPTION 117be20269fSAndy FiddamanEach of the functions in the 118be20269fSAndy Fiddaman.Nm 119be20269fSAndy Fiddamanfamily replaces the current process image with a new process image. 120be20269fSAndy FiddamanThe new image is constructed from a regular, executable file called the new 121be20269fSAndy Fiddamanprocess image file. 122be20269fSAndy FiddamanThis file is either an executable object file or a file of data for an 123be20269fSAndy Fiddamaninterpreter. 124be20269fSAndy FiddamanThere is no return from a successful call to one of these functions because the 125be20269fSAndy Fiddamancalling process image is overlaid by the new process image. 126be20269fSAndy Fiddaman.Pp 127c10c16deSRichard LoweAn interpreter file begins with a line of the form 128be20269fSAndy Fiddaman.Pp 129be20269fSAndy Fiddaman.Dl #! Pa pathname Op Ar arg 130be20269fSAndy Fiddaman.Pp 131be20269fSAndy Fiddamanwhere 132be20269fSAndy Fiddaman.Pa pathname 133be20269fSAndy Fiddamanis the path of the interpreter, and 134be20269fSAndy Fiddaman.Ar arg 135be20269fSAndy Fiddamanis an optional argument. 136be20269fSAndy FiddamanWhen an interpreter file is executed, the system invokes the specified 137be20269fSAndy Fiddamaninterpreter. 138be20269fSAndy FiddamanThe pathname specified in the interpreter file is passed as 139be20269fSAndy Fiddaman.Fa arg0 140be20269fSAndy Fiddamanto the interpreter. 141be20269fSAndy FiddamanIf 142be20269fSAndy Fiddaman.Ar arg 143be20269fSAndy Fiddamanwas specified in the interpreter file, it is passed as 144be20269fSAndy Fiddaman.Fa arg1 145be20269fSAndy Fiddamanto the interpreter. 146be20269fSAndy FiddamanThe remaining arguments to the interpreter are 147be20269fSAndy Fiddaman.Fa arg0 148be20269fSAndy Fiddamanthrough 149be20269fSAndy Fiddaman.Fa argn 150be20269fSAndy Fiddamanof the originally exec'd file. 151be20269fSAndy FiddamanThe interpreter named by 152be20269fSAndy Fiddaman.Pa pathname 153be20269fSAndy Fiddamanmay also be an interpreter file. 15493cf283aSJerry JelinekThere can be up to four nested interpreter files before the final interpreter. 15593cf283aSJerry JelinekThe setid bits on nested interpreters are silently ignored. 156be20269fSAndy Fiddaman.Pp 157c10c16deSRichard LoweWhen a C-language program is executed as a result of this call, it is entered 158c10c16deSRichard Loweas a C-language function call as follows: 159be20269fSAndy Fiddaman.Pp 160be20269fSAndy Fiddaman.Dl int main Ns (int Fa argc Ns No , char * Ns Fa argv[])\&; 161be20269fSAndy Fiddaman.Pp 162be20269fSAndy Fiddamanwhere 163be20269fSAndy Fiddaman.Fa argc 164be20269fSAndy Fiddamanis the argument count and 165be20269fSAndy Fiddaman.Fa argv 166be20269fSAndy Fiddamanis an array of character pointers to the arguments themselves. 167be20269fSAndy FiddamanIn addition, the following variable: 168be20269fSAndy Fiddaman.Pp 169be20269fSAndy Fiddaman.Dl Va "extern char **environ\&;" 170be20269fSAndy Fiddaman.Pp 171c10c16deSRichard Loweis initialized as a pointer to an array of character pointers to the 172be20269fSAndy Fiddamanenvironment strings. 173be20269fSAndy FiddamanThe 174be20269fSAndy Fiddaman.Fa argv 175be20269fSAndy Fiddamanand 176be20269fSAndy Fiddaman.Va environ 177be20269fSAndy Fiddamanarrays are each terminated by a null pointer. 178be20269fSAndy FiddamanThe null pointer terminating the 179be20269fSAndy Fiddaman.Fa argv 180be20269fSAndy Fiddamanarray is not counted in 181be20269fSAndy Fiddaman.Fa argc . 182be20269fSAndy Fiddaman.Pp 183be20269fSAndy FiddamanThe value of 184be20269fSAndy Fiddaman.Fa argc 185be20269fSAndy Fiddamanis non-negative, and if greater than 0, 186be20269fSAndy Fiddaman.Fa argv[0] 187be20269fSAndy Fiddamanpoints to a string containing the name of the file. 188be20269fSAndy FiddamanIf 189be20269fSAndy Fiddaman.Fa argc 190be20269fSAndy Fiddamanis 0, 191be20269fSAndy Fiddaman.Fa argv[0] 192be20269fSAndy Fiddamanis a null pointer, in which case there are no arguments. 193be20269fSAndy FiddamanApplications should verify that 194be20269fSAndy Fiddaman.Fa argc 195be20269fSAndy Fiddamanis greater than 0 or that 196be20269fSAndy Fiddaman.Fa argv[0] 197be20269fSAndy Fiddamanis not a null pointer before dereferencing 198be20269fSAndy Fiddaman.Fa argv[0] . 199be20269fSAndy Fiddaman.Pp 200be20269fSAndy FiddamanThe arguments specified by a program with one of the 201be20269fSAndy Fiddaman.Nm 202be20269fSAndy Fiddamanfunctions are passed on to the new process image in the 203be20269fSAndy Fiddaman.Fn main 204be20269fSAndy Fiddamanarguments. 205be20269fSAndy Fiddaman.Pp 206be20269fSAndy FiddamanThe 207be20269fSAndy Fiddaman.Fa path 208be20269fSAndy Fiddamanargument points to a path name that identifies the new process image file. 209be20269fSAndy Fiddaman.Pp 210be20269fSAndy FiddamanThe 211be20269fSAndy Fiddaman.Fa file 212be20269fSAndy Fiddamanargument is used to construct a pathname that identifies the new process image 213be20269fSAndy Fiddamanfile. 214be20269fSAndy FiddamanIf the 215be20269fSAndy Fiddaman.Fa file 216be20269fSAndy Fiddamanargument contains a slash character, it is used as the pathname for this file. 217be20269fSAndy FiddamanOtherwise, the path prefix for this file is obtained by a search of the 218be20269fSAndy Fiddamandirectories passed in the 219be20269fSAndy Fiddaman.Ev PATH 220be20269fSAndy Fiddamanenvironment variable 221be20269fSAndy Fiddaman.Po 222be20269fSAndy Fiddamansee 223be20269fSAndy Fiddaman.Xr environ 7 224be20269fSAndy Fiddaman.Pc . 225be20269fSAndy FiddamanThe environment is supplied typically by the shell. 226be20269fSAndy FiddamanIf the process image file is not a valid executable object file, 227a89c0811SRobert Mustacchi.Fn execlp , 228a89c0811SRobert Mustacchi.Fn execvp , 229be20269fSAndy Fiddamanand 230a89c0811SRobert Mustacchi.Fn execvpe 231be20269fSAndy Fiddamanuse the contents of that file as standard input to the shell. 232be20269fSAndy FiddamanIn this case, the shell becomes the new process image. 233be20269fSAndy FiddamanThe standard to which the caller conforms determines which shell is used. 234be20269fSAndy FiddamanSee 235be20269fSAndy Fiddaman.Xr standards 7 . 236be20269fSAndy Fiddaman.Pp 2372b395c3cSAndy FiddamanThe 2382b395c3cSAndy Fiddaman.Fn fexecve 2392b395c3cSAndy Fiddamanfunction is equivalent to 2402b395c3cSAndy Fiddaman.Fn execve , 2412b395c3cSAndy Fiddamanexcept that instead of using a named file, the file referenced by the file 2422b395c3cSAndy Fiddamandescriptor 2432b395c3cSAndy Fiddaman.Fa fd 2442b395c3cSAndy Fiddamanis used. 2452b395c3cSAndy FiddamanNote that this file descriptor must reference a regular file which has 2462b395c3cSAndy Fiddamantypically been opened with 2472b395c3cSAndy Fiddaman.Dv O_EXEC . 2482b395c3cSAndy Fiddamandefined in 2492b395c3cSAndy Fiddaman.In fcntl.h . 2502b395c3cSAndy FiddamanThe image is loaded from offset zero of the file, regardless of the offset of 2512b395c3cSAndy Fiddamanfd. 2522b395c3cSAndy Fiddaman.Pp 253be20269fSAndy FiddamanThe arguments represented by 254be20269fSAndy Fiddaman.Fa arg0 Ns No \&... 255be20269fSAndy Fiddamanare pointers to null-terminated character strings. 256be20269fSAndy FiddamanThese strings constitute the argument list available to the new process image. 257be20269fSAndy FiddamanThe list is terminated by a null pointer. 258be20269fSAndy FiddamanThe 259be20269fSAndy Fiddaman.Fa arg0 260be20269fSAndy Fiddamanargument should point to a filename that is associated with the process being 261be20269fSAndy Fiddamanstarted by one of the 262be20269fSAndy Fiddaman.Nm 263be20269fSAndy Fiddamanfunctions. 264be20269fSAndy Fiddaman.Pp 265be20269fSAndy FiddamanThe 266be20269fSAndy Fiddaman.Fa argv 267be20269fSAndy Fiddamanargument is an array of character pointers to null-terminated strings. 268be20269fSAndy FiddamanThe last member of this array must be a null pointer. 269be20269fSAndy FiddamanThese strings constitute the argument list available to the new process image. 270be20269fSAndy FiddamanThe value in 271be20269fSAndy Fiddaman.Fa argv[0] 272be20269fSAndy Fiddamanshould point to a filename that is associated with the process being started by 273be20269fSAndy Fiddamanone of the 274be20269fSAndy Fiddaman.Nm 275be20269fSAndy Fiddamanfunctions. 276be20269fSAndy Fiddaman.Pp 277be20269fSAndy FiddamanThe 278be20269fSAndy Fiddaman.Fa envp 279be20269fSAndy Fiddamanargument is an array of character pointers to null-terminated strings. 280be20269fSAndy FiddamanThese strings constitute the environment for the new process image. 281be20269fSAndy FiddamanThe 282be20269fSAndy Fiddaman.Fa envp 283be20269fSAndy Fiddamanarray is terminated by a null pointer. 284be20269fSAndy FiddamanFor 285be20269fSAndy Fiddaman.Fn execl , 286be20269fSAndy Fiddaman.Fn execv , 287be20269fSAndy Fiddaman.Fn execvp , 288be20269fSAndy Fiddamanand 289be20269fSAndy Fiddaman.Fn execlp , 290be20269fSAndy Fiddamanthe C-language run-time start-off routine places a pointer to the environment 291be20269fSAndy Fiddamanof the calling process in the global object 292be20269fSAndy Fiddaman.Va extern char **environ , 293be20269fSAndy Fiddamanand it is used to pass the environment of the calling process to the new 294be20269fSAndy Fiddamanprocess image. 295be20269fSAndy Fiddaman.Pp 296c10c16deSRichard LoweThe number of bytes available for the new process's combined argument and 297be20269fSAndy Fiddamanenvironment lists is 298be20269fSAndy Fiddaman.Dv ARG_MAX . 299be20269fSAndy FiddamanIt is implementation-dependent whether null terminators, pointers, and/or any 300be20269fSAndy Fiddamanalignment bytes are included in this total. 301be20269fSAndy Fiddaman.Pp 302c10c16deSRichard LoweFile descriptors open in the calling process image remain open in the new 303be20269fSAndy Fiddamanprocess image, except for those whose close-on-exec flag 304be20269fSAndy Fiddaman.Dv FD_CLOEXEC 305be20269fSAndy Fiddamanis set; see 306be20269fSAndy Fiddaman.Xr fcntl 2 . 307be20269fSAndy FiddamanFor those file descriptors that remain open, all attributes of the open file 308*0250c53aSRobert Mustacchidescription, including file locks and the disposition of the close-on-fork flag 309*0250c53aSRobert Mustacchi.Dv FD_CLOFORK , 310*0250c53aSRobert Mustacchiremain unchanged. 311be20269fSAndy Fiddaman.Pp 312be20269fSAndy FiddamanThe preferred hardware address translation size 313be20269fSAndy Fiddaman.Po 314be20269fSAndy Fiddamansee 315be20269fSAndy Fiddaman.Xr memcntl 2 316be20269fSAndy Fiddaman.Pc 317be20269fSAndy Fiddamanfor the stack and heap of the new process image are set to the default system 318be20269fSAndy Fiddamanpage size. 319be20269fSAndy Fiddaman.Pp 320c10c16deSRichard LoweDirectory streams open in the calling process image are closed in the new 321c10c16deSRichard Loweprocess image. 322be20269fSAndy Fiddaman.Pp 323c10c16deSRichard LoweThe state of conversion descriptors and message catalogue descriptors in the 324be20269fSAndy Fiddamannew process image is undefined. 325be20269fSAndy FiddamanFor the new process, the equivalent of: 326be20269fSAndy Fiddaman.Pp 327be20269fSAndy Fiddaman.Dl setlocale(LC_ALL, \&"C"); 328be20269fSAndy Fiddaman.Pp 329c10c16deSRichard Loweis executed at startup. 330be20269fSAndy Fiddaman.Pp 331be20269fSAndy FiddamanSignals set to the default action 332be20269fSAndy Fiddaman.Po 333be20269fSAndy Fiddaman.Dv SIG_DFL 334be20269fSAndy Fiddaman.Pc 335be20269fSAndy Fiddamanin the calling process image are set to the default action in the new process 336be20269fSAndy Fiddamanimage 337be20269fSAndy Fiddaman.Po 338be20269fSAndy Fiddamansee 339be20269fSAndy Fiddaman.Xr signal 3C 340be20269fSAndy Fiddaman.Pc . 341be20269fSAndy FiddamanSignals set to be ignored 342be20269fSAndy Fiddaman.Po 343be20269fSAndy Fiddaman.Dv SIG_IGN 344be20269fSAndy Fiddaman.Pc 345be20269fSAndy Fiddamanby the calling process image are set to be ignored by the new process image. 346be20269fSAndy FiddamanSignals set to be caught by the calling process image are set to the default 347be20269fSAndy Fiddamanaction in the new process image 348be20269fSAndy Fiddaman.Po 349be20269fSAndy Fiddamansee 350be20269fSAndy Fiddaman.Xr signal.h 3HEAD 351be20269fSAndy Fiddaman.Pc . 352be20269fSAndy FiddamanAfter a successful call to any of the 353be20269fSAndy Fiddaman.Nm 354be20269fSAndy Fiddamanfunctions, alternate signal stacks are not preserved and the 355be20269fSAndy Fiddaman.Dv SA_ONSTACK 356c10c16deSRichard Loweflag is cleared for all signals. 357be20269fSAndy Fiddaman.Pp 358be20269fSAndy FiddamanAfter a successful call to any of the 359be20269fSAndy Fiddaman.Nm 360be20269fSAndy Fiddamanfunctions, any functions previously registered by 361be20269fSAndy Fiddaman.Xr atexit 3C 362be20269fSAndy Fiddamanare no longer registered. 363be20269fSAndy Fiddaman.Pp 364c10c16deSRichard LoweThe saved resource limits in the new process image are set to be a copy of the 365c10c16deSRichard Loweprocess's corresponding hard and soft resource limits. 366be20269fSAndy Fiddaman.Pp 367be20269fSAndy FiddamanIf the 368be20269fSAndy Fiddaman.Dv ST_NOSUID 369be20269fSAndy Fiddamanbit is set for the file system containing the new process image file, then the 370be20269fSAndy Fiddamaneffective user ID and effective group ID are unchanged in the new process 371be20269fSAndy Fiddamanimage. 372be20269fSAndy FiddamanIf the set-user-ID mode bit of the new process image file is set 373be20269fSAndy Fiddaman.Po 374be20269fSAndy Fiddamansee 375be20269fSAndy Fiddaman.Xr chmod 2 376be20269fSAndy Fiddaman.Pc , 377be20269fSAndy Fiddamanthe effective user ID of the new process image is set to the owner ID of the 378be20269fSAndy Fiddamannew process image file. 379be20269fSAndy FiddamanSimilarly, if the set-group-ID mode bit of the new process image file is set, 380be20269fSAndy Fiddamanthe effective group ID of the new process image is set to the group ID of the 381be20269fSAndy Fiddamannew process image file. 382be20269fSAndy FiddamanThe real user ID and real group ID of the new process image remain the same as 383be20269fSAndy Fiddamanthose of the calling process image. 384be20269fSAndy FiddamanThe effective user ID and effective group ID of the new process image are saved 385be20269fSAndy Fiddaman.Pq as the saved set-user-ID and the saved set-group-ID 386be20269fSAndy Fiddamanfor use by 387be20269fSAndy Fiddaman.Xr setuid 2 . 388be20269fSAndy Fiddaman.Pp 389c10c16deSRichard LoweThe privilege sets are changed according to the following rules: 390be20269fSAndy Fiddaman.Bl -enum -offset indent 391be20269fSAndy Fiddaman.It 392be20269fSAndy FiddamanThe inheritable set, I, is intersected with the limit set, L. 393be20269fSAndy FiddamanThis mechanism enforces the limit set for processes. 394be20269fSAndy Fiddaman.It 395c10c16deSRichard LoweThe effective set, E, and the permitted set, P, are made equal to the new 396c10c16deSRichard Loweinheritable set. 397be20269fSAndy Fiddaman.El 398be20269fSAndy Fiddaman.Pp 399c10c16deSRichard LoweThe system attempts to set the privilege-aware state to non-PA both before 400c10c16deSRichard Loweperforming any modifications to the process IDs and privilege sets as well as 401c10c16deSRichard Loweafter completing the transition to new UIDs and privilege sets, following the 402be20269fSAndy Fiddamanrules outlined in 403be20269fSAndy Fiddaman.Xr privileges 7 . 404be20269fSAndy Fiddaman.Pp 405be20269fSAndy FiddamanIf the 406be20269fSAndy Fiddaman.Brq Dv PRIV_PROC_OWNER 407be20269fSAndy Fiddamanprivilege is asserted in the effective set, the set-user-ID and set-group-ID 408be20269fSAndy Fiddamanbits will be honored when the process is being controlled by 409be20269fSAndy Fiddaman.Xr ptrace 3C . 410be20269fSAndy FiddamanAdditional restrictions can apply when the traced process has an effective UID 411be20269fSAndy Fiddamanof 0. 412be20269fSAndy FiddamanSee 413be20269fSAndy Fiddaman.Xr privileges 7 . 414be20269fSAndy Fiddaman.Pp 415c10c16deSRichard LoweAny shared memory segments attached to the calling process image will not be 416be20269fSAndy Fiddamanattached to the new process image 417be20269fSAndy Fiddaman.Po 418be20269fSAndy Fiddamansee 419be20269fSAndy Fiddaman.Xr shmop 2 420be20269fSAndy Fiddaman.Pc . 421be20269fSAndy FiddamanAny mappings established through 422be20269fSAndy Fiddaman.Fn mmap 423be20269fSAndy Fiddamanare not preserved across an 424be20269fSAndy Fiddaman.Nm . 425be20269fSAndy FiddamanMemory mappings created in the process are unmapped before the address space is 426be20269fSAndy Fiddamanrebuilt for the new process image. 427be20269fSAndy FiddamanSee 428be20269fSAndy Fiddaman.Xr mmap 2 . 429be20269fSAndy Fiddaman.Pp 430be20269fSAndy FiddamanMemory locks established by the calling process via calls to 431be20269fSAndy Fiddaman.Xr mlockall 3C 432be20269fSAndy Fiddamanor 433be20269fSAndy Fiddaman.Xr mlock 3C 434be20269fSAndy Fiddamanare removed. 435be20269fSAndy FiddamanIf locked pages in the address space of the calling process are also mapped 436be20269fSAndy Fiddamaninto the address spaces the locks established by the other processes will be 437be20269fSAndy Fiddamanunaffected by the call by this process to the 438be20269fSAndy Fiddaman.Nm 439be20269fSAndy Fiddamanfunction. 440be20269fSAndy FiddamanIf the 441be20269fSAndy Fiddaman.Nm 442be20269fSAndy Fiddamanfunction fails, the effect on memory locks is unspecified. 443be20269fSAndy Fiddaman.Pp 444be20269fSAndy FiddamanIf 445be20269fSAndy Fiddaman.Dv _XOPEN_REALTIME 446be20269fSAndy Fiddamanis defined and has a value other than \-1, any named semaphores open in the 447be20269fSAndy Fiddamancalling process are closed as if by appropriate calls to 448be20269fSAndy Fiddaman.Xr sem_close 3C . 449be20269fSAndy Fiddaman.Pp 450be20269fSAndy FiddamanProfiling is disabled for the new process; see 451be20269fSAndy Fiddaman.Xr profil 2 . 452be20269fSAndy Fiddaman.Pp 453be20269fSAndy FiddamanTimers created by the calling process with 454be20269fSAndy Fiddaman.Xr timer_create 3C 455be20269fSAndy Fiddamanare deleted before replacing the current process image with the new process 456be20269fSAndy Fiddamanimage. 457be20269fSAndy Fiddaman.Pp 458be20269fSAndy FiddamanFor the 459be20269fSAndy Fiddaman.Dv SCHED_FIFO 460be20269fSAndy Fiddamanand 461be20269fSAndy Fiddaman.Dv SCHED_RR 462be20269fSAndy Fiddamanscheduling policies, the policy and priority settings are not changed by a call 463be20269fSAndy Fiddamanto an 464be20269fSAndy Fiddaman.Nm 465be20269fSAndy Fiddamanfunction. 466be20269fSAndy Fiddaman.Pp 467c10c16deSRichard LoweAll open message queue descriptors in the calling process are closed, as 468be20269fSAndy Fiddamandescribed in 469be20269fSAndy Fiddaman.Xr mq_close 3C . 470be20269fSAndy Fiddaman.Pp 471be20269fSAndy FiddamanAny outstanding asynchronous I/O operations may be cancelled. 472be20269fSAndy FiddamanThose asynchronous I/O operations that are not canceled will complete as if the 473be20269fSAndy Fiddaman.Nm 474be20269fSAndy Fiddamanfunction had not yet occurred, but any associated signal notifications are 475be20269fSAndy Fiddamansuppressed. 476be20269fSAndy FiddamanIt is unspecified whether the 477be20269fSAndy Fiddaman.Nm 478be20269fSAndy Fiddamanfunction itself blocks awaiting such I/O completion. 479be20269fSAndy FiddamanIn no event, however, will the new process image created by the 480be20269fSAndy Fiddaman.Nm 481be20269fSAndy Fiddamanfunction be affected by the presence of outstanding asynchronous I/O operations 482be20269fSAndy Fiddamanat the time the 483be20269fSAndy Fiddaman.Nm 484be20269fSAndy Fiddamanfunction is called. 485be20269fSAndy Fiddaman.Pp 486be20269fSAndy FiddamanAll active contract templates are cleared 487be20269fSAndy Fiddaman.Po 488be20269fSAndy Fiddamansee 489be20269fSAndy Fiddaman.Xr contract 5 490be20269fSAndy Fiddaman.Pc . 491be20269fSAndy Fiddaman.Pp 492be20269fSAndy FiddamanThe new process also inherits the following attributes from the calling process: 493be20269fSAndy Fiddaman.Bl -bullet -offset Ds 494be20269fSAndy Fiddaman.It 495c10c16deSRichard Lowecontrolling terminal 496be20269fSAndy Fiddaman.It 497c10c16deSRichard Lowecurrent working directory 498be20269fSAndy Fiddaman.It 499be20269fSAndy Fiddamanfile-locks 500be20269fSAndy Fiddaman.Po 501be20269fSAndy Fiddamansee 502be20269fSAndy Fiddaman.Xr fcntl 2 503be20269fSAndy Fiddamanand 504be20269fSAndy Fiddaman.Xr lockf 3C 505be20269fSAndy Fiddaman.Pc 506be20269fSAndy Fiddaman.It 507be20269fSAndy Fiddamanfile mode creation mask 508be20269fSAndy Fiddaman.Po 509be20269fSAndy Fiddamansee 510be20269fSAndy Fiddaman.Xr umask 2 511be20269fSAndy Fiddaman.Pc 512be20269fSAndy Fiddaman.It 513be20269fSAndy Fiddamanfile size limit 514be20269fSAndy Fiddaman.Po 515be20269fSAndy Fiddamansee 516be20269fSAndy Fiddaman.Xr ulimit 2 517be20269fSAndy Fiddaman.Pc 518be20269fSAndy Fiddaman.It 519c10c16deSRichard Lowelimit privilege set 520be20269fSAndy Fiddaman.It 521be20269fSAndy Fiddamannice value 522be20269fSAndy Fiddaman.Po 523be20269fSAndy Fiddamansee 524be20269fSAndy Fiddaman.Xr nice 2 525be20269fSAndy Fiddaman.Pc 526be20269fSAndy Fiddaman.It 527be20269fSAndy Fiddamanparent process ID 528be20269fSAndy Fiddaman.It 529be20269fSAndy Fiddamanpending signals 530be20269fSAndy Fiddaman.Po 531be20269fSAndy Fiddamansee 532be20269fSAndy Fiddaman.Xr sigpending 2 533be20269fSAndy Fiddaman.Pc 534be20269fSAndy Fiddaman.It 535be20269fSAndy Fiddamanprivilege debugging flag 536be20269fSAndy Fiddaman.Po 537be20269fSAndy Fiddamansee 538be20269fSAndy Fiddaman.Xr privileges 7 539be20269fSAndy Fiddamanand 540be20269fSAndy Fiddaman.Xr getpflags 2 541be20269fSAndy Fiddaman.Pc 542be20269fSAndy Fiddaman.It 543be20269fSAndy Fiddamanprocess ID 544be20269fSAndy Fiddaman.It 545be20269fSAndy Fiddamanprocess contract 546be20269fSAndy Fiddaman.Po 547be20269fSAndy Fiddamansee 548be20269fSAndy Fiddaman.Xr contract 5 549be20269fSAndy Fiddamanand 550be20269fSAndy Fiddaman.Xr process 5 551be20269fSAndy Fiddaman.Pc 552be20269fSAndy Fiddaman.It 553be20269fSAndy Fiddamanprocess group ID 554be20269fSAndy Fiddaman.It 555be20269fSAndy Fiddamanprocess signal mask 556be20269fSAndy Fiddaman.Po 557be20269fSAndy Fiddamansee 558be20269fSAndy Fiddaman.Xr sigprocmask 2 559be20269fSAndy Fiddaman.Pc 560be20269fSAndy Fiddaman.It 561be20269fSAndy Fiddamanprocessor bindings 562be20269fSAndy Fiddaman.Po 563be20269fSAndy Fiddamansee 564be20269fSAndy Fiddaman.Xr processor_bind 2 565be20269fSAndy Fiddaman.Pc 566be20269fSAndy Fiddaman.It 567be20269fSAndy Fiddamanprocessor set bindings 568be20269fSAndy Fiddaman.Po 569be20269fSAndy Fiddamansee 570be20269fSAndy Fiddaman.Xr pset_bind 2 571be20269fSAndy Fiddaman.Pc 572be20269fSAndy Fiddaman.It 573be20269fSAndy Fiddamanproject ID 574be20269fSAndy Fiddaman.It 575be20269fSAndy Fiddamanreal group ID 576be20269fSAndy Fiddaman.It 577be20269fSAndy Fiddamanreal user ID 578be20269fSAndy Fiddaman.It 579be20269fSAndy Fiddamanresource limits 580be20269fSAndy Fiddaman.Po 581be20269fSAndy Fiddamansee 582be20269fSAndy Fiddaman.Xr getrlimit 2 583be20269fSAndy Fiddaman.Pc 584be20269fSAndy Fiddaman.It 585c10c16deSRichard Loweroot directory 586be20269fSAndy Fiddaman.It 587be20269fSAndy Fiddamanscheduler class and priority 588be20269fSAndy Fiddaman.Po 589be20269fSAndy Fiddamansee 590be20269fSAndy Fiddaman.Xr priocntl 2 591be20269fSAndy Fiddaman.Pc 592be20269fSAndy Fiddaman.It 593be20269fSAndy Fiddamansemadj values 594be20269fSAndy Fiddaman.Po 595be20269fSAndy Fiddamansee 596be20269fSAndy Fiddaman.Xr semop 2 597be20269fSAndy Fiddaman.Pc 598be20269fSAndy Fiddaman.It 599be20269fSAndy Fiddamansession membership 600be20269fSAndy Fiddaman.Po 601be20269fSAndy Fiddamansee 602be20269fSAndy Fiddaman.Xr exit 2 603be20269fSAndy Fiddamanand 604be20269fSAndy Fiddaman.Xr signal 3C 605be20269fSAndy Fiddaman.Pc 606be20269fSAndy Fiddaman.It 607be20269fSAndy Fiddamansupplementary group IDs 608be20269fSAndy Fiddaman.It 609be20269fSAndy Fiddamantask ID 610be20269fSAndy Fiddaman.It 611be20269fSAndy Fiddamantime left until an alarm clock signal 612be20269fSAndy Fiddaman.Po 613be20269fSAndy Fiddamansee 614be20269fSAndy Fiddaman.Xr alarm 2 615be20269fSAndy Fiddaman.Pc 616be20269fSAndy Fiddaman.It 617be20269fSAndy Fiddaman.Fa tms_utime , 618be20269fSAndy Fiddaman.Fa tms_stime , 619be20269fSAndy Fiddaman.Fa tms_cutime , 620be20269fSAndy Fiddamanand 621be20269fSAndy Fiddaman.Fa tms_cstime 622be20269fSAndy Fiddaman.Po 623be20269fSAndy Fiddamansee 624be20269fSAndy Fiddaman.Xr times 2 625be20269fSAndy Fiddaman.Pc 626be20269fSAndy Fiddaman.It 627be20269fSAndy Fiddamantrace flag 628be20269fSAndy Fiddaman.Po 629be20269fSAndy Fiddamansee 630be20269fSAndy Fiddaman.Xr ptrace 3C 631be20269fSAndy Fiddamanrequest 0 632be20269fSAndy Fiddaman.Pc 633be20269fSAndy Fiddaman.El 634be20269fSAndy Fiddaman.Pp 635be20269fSAndy FiddamanA call to any 636be20269fSAndy Fiddaman.Nm 637be20269fSAndy Fiddamanfunction from a process with more than one thread results in all threads being 638be20269fSAndy Fiddamanterminated and the new executable image being loaded and executed. 639be20269fSAndy FiddamanNo destructor functions will be called. 640be20269fSAndy Fiddaman.Pp 641be20269fSAndy FiddamanUpon successful completion, each of the functions in the 642be20269fSAndy Fiddaman.Nm 643be20269fSAndy Fiddamanfamily marks for update the 644be20269fSAndy Fiddaman.Fa st_atime 645be20269fSAndy Fiddamanfield of the file. 646be20269fSAndy FiddamanIf an 647be20269fSAndy Fiddaman.Nm 648be20269fSAndy Fiddamanfunction failed but was able to locate the process image file, whether the 649be20269fSAndy Fiddaman.Fa st_atime 650be20269fSAndy Fiddamanfield is marked for update is unspecified. 651be20269fSAndy FiddamanShould the function succeed, the process image file is considered to have been 652be20269fSAndy Fiddamanopened with 653be20269fSAndy Fiddaman.Xr open 2 . 654be20269fSAndy FiddamanThe corresponding 655be20269fSAndy Fiddaman.Xr close 2 656be20269fSAndy Fiddamanis considered to occur at a time after this open, but before process 657be20269fSAndy Fiddamantermination or successful completion of a subsequent call to one of the 658be20269fSAndy Fiddaman.Nm 659be20269fSAndy Fiddamanfunctions. 660be20269fSAndy FiddamanThe 661be20269fSAndy Fiddaman.Fa argv[] 662be20269fSAndy Fiddamanand 663be20269fSAndy Fiddaman.Fa envp[] 664be20269fSAndy Fiddamanarrays of pointers and the strings to which those arrays point will not be 665be20269fSAndy Fiddamanmodified by a call to one of the 666be20269fSAndy Fiddaman.Nm 667be20269fSAndy Fiddamanfunctions, except as a consequence of replacing the process image. 668be20269fSAndy Fiddaman.Pp 669c10c16deSRichard LoweThe saved resource limits in the new process image are set to be a copy of the 670c10c16deSRichard Loweprocess's corresponding hard and soft limits. 671be20269fSAndy Fiddaman.Sh RETURN VALUES 672be20269fSAndy FiddamanIf a function in the 673be20269fSAndy Fiddaman.Nm 674be20269fSAndy Fiddamanfamily returns to the calling process image, an error has occurred; the return 675be20269fSAndy Fiddamanvalue is \-1 and 676be20269fSAndy Fiddaman.Va errno 677be20269fSAndy Fiddamanis set to indicate the error. 678be20269fSAndy Fiddaman.Sh ERRORS 679be20269fSAndy FiddamanThe 680be20269fSAndy Fiddaman.Nm 681be20269fSAndy Fiddamanfunctions will fail if: 682be20269fSAndy Fiddaman.Bl -tag -width Er 683be20269fSAndy Fiddaman.It Er E2BIG 684c10c16deSRichard LoweThe number of bytes in the new process's argument list is greater than the 685be20269fSAndy Fiddamansystem-imposed limit of 686be20269fSAndy Fiddaman.Dv ARG_MAX 687be20269fSAndy Fiddamanbytes. 688be20269fSAndy FiddamanThe argument list limit is sum of the size of the argument list plus the size 689be20269fSAndy Fiddamanof the environment's exported shell variables. 690be20269fSAndy Fiddaman.It Er EACCES 691c10c16deSRichard LoweSearch permission is denied for a directory listed in the new process file's 692c10c16deSRichard Lowepath prefix. 693be20269fSAndy Fiddaman.Pp 694c10c16deSRichard LoweThe new process file is not an ordinary file. 695be20269fSAndy Fiddaman.Pp 696c10c16deSRichard LoweThe new process file mode denies execute permission. 697be20269fSAndy Fiddaman.Pp 698be20269fSAndy FiddamanThe 699be20269fSAndy Fiddaman.Brq Dv FILE_DAC_SEARCH 700be20269fSAndy Fiddamanprivilege overrides the restriction on directory searches. 701be20269fSAndy Fiddaman.Pp 702be20269fSAndy FiddamanThe 703be20269fSAndy Fiddaman.Brq Dv FILE_DAC_EXECUTE 704be20269fSAndy Fiddamanprivilege overrides the lack of execute permission. 705be20269fSAndy Fiddaman.It Er EAGAIN 706c10c16deSRichard LoweTotal amount of system memory available when reading using raw I/O is 707c10c16deSRichard Lowetemporarily insufficient. 708be20269fSAndy Fiddaman.It Er EFAULT 709c10c16deSRichard LoweAn argument points to an illegal address. 710be20269fSAndy Fiddaman.It Er EINVAL 711c10c16deSRichard LoweThe new process image file has the appropriate permission and has a recognized 712c10c16deSRichard Loweexecutable binary format, but the system does not support execution of a file 713c10c16deSRichard Lowewith this format. 714be20269fSAndy Fiddaman.It Er EINTR 715c10c16deSRichard LoweA signal was caught during the execution of one of the functions in the 716be20269fSAndy Fiddaman.Nm 717be20269fSAndy Fiddamanfamily. 7182b395c3cSAndy Fiddaman.El 7192b395c3cSAndy Fiddaman.Pp 7202b395c3cSAndy FiddamanThe 7212b395c3cSAndy Fiddaman.Nm 7222b395c3cSAndy Fiddamanfunctions except for 7232b395c3cSAndy Fiddaman.Fn fexecve 7242b395c3cSAndy Fiddamanwill fail if: 7252b395c3cSAndy Fiddaman.Bl -tag -width Ds 726be20269fSAndy Fiddaman.It Er ELOOP 727be20269fSAndy FiddamanToo many symbolic links were encountered in translating 728be20269fSAndy Fiddaman.Fa path 729be20269fSAndy Fiddamanor 730be20269fSAndy Fiddaman.Fa file , 731be20269fSAndy Fiddamanor too many nested interpreter files. 732be20269fSAndy Fiddaman.It Er ENAMETOOLONG 733be20269fSAndy FiddamanThe length of the 734be20269fSAndy Fiddaman.Fa file 735be20269fSAndy Fiddamanor 736be20269fSAndy Fiddaman.Fa path 737be20269fSAndy Fiddamanargument exceeds 738be20269fSAndy Fiddaman.Dv PATH_MAX , 739be20269fSAndy Fiddamanor the length of a 740be20269fSAndy Fiddaman.Fa file 741be20269fSAndy Fiddamanor 742be20269fSAndy Fiddaman.Fa path 743be20269fSAndy Fiddamancomponent exceeds 744be20269fSAndy Fiddaman.Dv NAME_MAX 745be20269fSAndy Fiddamanwhile 746be20269fSAndy Fiddaman.Dv _POSIX_NO_TRUNC 747be20269fSAndy Fiddamanis in effect. 748be20269fSAndy Fiddaman.It Er ENOENT 749c10c16deSRichard LoweOne or more components of the new process path name of the file do not exist or 750c10c16deSRichard Loweis a null pathname. 751be20269fSAndy Fiddaman.It Er ENOLINK 752be20269fSAndy FiddamanThe 753be20269fSAndy Fiddaman.Fa path 754be20269fSAndy Fiddamanargument points to a remote machine and the link to that machine is no longer 755be20269fSAndy Fiddamanactive. 756be20269fSAndy Fiddaman.It Er ENOTDIR 757c10c16deSRichard LoweA component of the new process path of the file prefix is not a directory. 758be20269fSAndy Fiddaman.El 759be20269fSAndy Fiddaman.Pp 760be20269fSAndy FiddamanThe 761be20269fSAndy Fiddaman.Nm 762be20269fSAndy Fiddamanfunctions, except for 763a89c0811SRobert Mustacchi.Fn execlp , 764be20269fSAndy Fiddaman.Fn execvp , 765a89c0811SRobert Mustacchiand 766a89c0811SRobert Mustacchi.Fn execvpe , 767be20269fSAndy Fiddamanwill fail if: 768be20269fSAndy Fiddaman.Bl -tag -width Ds 769be20269fSAndy Fiddaman.It Er ENOEXEC 770c10c16deSRichard LoweThe new process image file has the appropriate access permission but is not in 771c10c16deSRichard Lowethe proper format. 772be20269fSAndy Fiddaman.El 773be20269fSAndy Fiddaman.Pp 774be20269fSAndy FiddamanThe 7752b395c3cSAndy Fiddaman.Fn fexecve 7762b395c3cSAndy Fiddamanfunction will fail if: 7772b395c3cSAndy Fiddaman.Bl -tag -width Ds 7782b395c3cSAndy Fiddaman.It Er EBADF 7792b395c3cSAndy FiddamanThe 7802b395c3cSAndy Fiddaman.Fa fd 7812b395c3cSAndy Fiddamanargument is not a valid file descriptor opened for execution. 7822b395c3cSAndy Fiddaman.It Er ENOMEM 7832b395c3cSAndy FiddamanThere was insufficient memory for constructing the path corresponding to the 7842b395c3cSAndy Fiddamanfile descriptor. 7852b395c3cSAndy Fiddaman.El 7862b395c3cSAndy Fiddaman.Pp 7872b395c3cSAndy FiddamanThe 788be20269fSAndy Fiddaman.Nm 7892b395c3cSAndy Fiddamanfunctions except for 7902b395c3cSAndy Fiddaman.Fn fexecve 7912b395c3cSAndy Fiddamanmay fail if: 792be20269fSAndy Fiddaman.Bl -tag -width Ds 793be20269fSAndy Fiddaman.It Er ENAMETOOLONG 794c10c16deSRichard LowePathname resolution of a symbolic link produced an intermediate result whose 795be20269fSAndy Fiddamanlength exceeds 796be20269fSAndy Fiddaman.Dv PATH_MAX . 7972b395c3cSAndy Fiddaman.El 7982b395c3cSAndy Fiddaman.Pp 7992b395c3cSAndy FiddamanThe 8002b395c3cSAndy Fiddaman.Nm 8012b395c3cSAndy Fiddamanfunctions may fail if: 8022b395c3cSAndy Fiddaman.Bl -tag -width Ds 803be20269fSAndy Fiddaman.It Er ENOMEM 804c10c16deSRichard LoweThe new process image requires more memory than is allowed by the hardware or 805be20269fSAndy Fiddamansystem-imposed by memory management constraints. 806be20269fSAndy FiddamanSee 807be20269fSAndy Fiddaman.Xr brk 2 . 808be20269fSAndy Fiddaman.It Er ETXTBSY 809be20269fSAndy FiddamanThe new process image file is a pure procedure 810be20269fSAndy Fiddaman.Pq shared text 811be20269fSAndy Fiddamanfile that is currently open for writing by some process. 812be20269fSAndy Fiddaman.El 813be20269fSAndy Fiddaman.Sh USAGE 814c10c16deSRichard LoweAs the state of conversion descriptors and message catalogue descriptors in the 815c10c16deSRichard Lowenew process image is undefined, portable applications should not rely on their 816be20269fSAndy Fiddamanuse and should close them prior to calling one of the 817be20269fSAndy Fiddaman.Nm 818be20269fSAndy Fiddamanfunctions. 819be20269fSAndy Fiddaman.Pp 820c10c16deSRichard LoweApplications that require other than the default POSIX locale should call 821be20269fSAndy Fiddaman.Xr setlocale 3C 822be20269fSAndy Fiddamanwith the appropriate parameters to establish the locale of the new process. 823be20269fSAndy Fiddaman.Pp 824be20269fSAndy FiddamanThe 825be20269fSAndy Fiddaman.Fa environ 826be20269fSAndy Fiddamanarray should not be accessed directly by the application. 827be20269fSAndy Fiddaman.Sh INTERFACE STABILITY 828be20269fSAndy Fiddaman.Sy Committed 829be20269fSAndy Fiddaman.Sh MT-LEVEL 830be20269fSAndy FiddamanThe 8312b395c3cSAndy Fiddaman.Fn execle , 832be20269fSAndy Fiddaman.Fn execve 8332b395c3cSAndy Fiddamanand 8342b395c3cSAndy Fiddaman.Fn fexecve 835be20269fSAndy Fiddamanfunctions are 8362b395c3cSAndy Fiddaman.Sy Async-Signal-Safe 837be20269fSAndy Fiddaman.Sh SEE ALSO 838be20269fSAndy Fiddaman.Xr ksh 1 , 839be20269fSAndy Fiddaman.Xr ps 1 , 840be20269fSAndy Fiddaman.Xr sh 1 , 841be20269fSAndy Fiddaman.Xr alarm 2 , 842be20269fSAndy Fiddaman.Xr brk 2 , 843be20269fSAndy Fiddaman.Xr chmod 2 , 844be20269fSAndy Fiddaman.Xr close 2 , 845be20269fSAndy Fiddaman.Xr exit 2 , 846be20269fSAndy Fiddaman.Xr fcntl 2 , 847be20269fSAndy Fiddaman.Xr fork 2 , 848be20269fSAndy Fiddaman.Xr getpflags 2 , 849be20269fSAndy Fiddaman.Xr getrlimit 2 , 850be20269fSAndy Fiddaman.Xr memcntl 2 , 851be20269fSAndy Fiddaman.Xr mmap 2 , 852be20269fSAndy Fiddaman.Xr nice 2 , 853be20269fSAndy Fiddaman.Xr open 2 , 854be20269fSAndy Fiddaman.Xr priocntl 2 , 855be20269fSAndy Fiddaman.Xr processor_bind 2 , 856be20269fSAndy Fiddaman.Xr profil 2 , 857be20269fSAndy Fiddaman.Xr pset_bind 2 , 858be20269fSAndy Fiddaman.Xr semop 2 , 859be20269fSAndy Fiddaman.Xr setuid 2 , 860be20269fSAndy Fiddaman.Xr shmop 2 , 861be20269fSAndy Fiddaman.Xr sigpending 2 , 862be20269fSAndy Fiddaman.Xr sigprocmask 2 , 863be20269fSAndy Fiddaman.Xr times 2 , 864be20269fSAndy Fiddaman.Xr ulimit 2 , 865be20269fSAndy Fiddaman.Xr umask 2 , 866be20269fSAndy Fiddaman.Xr atexit 3C , 867be20269fSAndy Fiddaman.Xr lockf 3C , 868be20269fSAndy Fiddaman.Xr mlock 3C , 869be20269fSAndy Fiddaman.Xr mlockall 3C , 870be20269fSAndy Fiddaman.Xr mq_close 3C , 871be20269fSAndy Fiddaman.Xr ptrace 3C , 872be20269fSAndy Fiddaman.Xr sem_close 3C , 873be20269fSAndy Fiddaman.Xr setlocale 3C , 874be20269fSAndy Fiddaman.Xr signal 3C , 875be20269fSAndy Fiddaman.Xr system 3C , 876be20269fSAndy Fiddaman.Xr timer_create 3C , 877be20269fSAndy Fiddaman.Xr signal.h 3HEAD , 878be20269fSAndy Fiddaman.Xr a.out 5 , 879be20269fSAndy Fiddaman.Xr contract 5 , 880be20269fSAndy Fiddaman.Xr process 5 , 881be20269fSAndy Fiddaman.Xr attributes 7 , 882be20269fSAndy Fiddaman.Xr environ 7 , 883be20269fSAndy Fiddaman.Xr privileges 7 , 884be20269fSAndy Fiddaman.Xr standards 7 885be20269fSAndy Fiddaman.Sh WARNINGS 886be20269fSAndy FiddamanIf a program is setuid to a user ID other than the superuser, and the program 887be20269fSAndy Fiddamanis executed when the real user ID is super-user, then the program has some of 888be20269fSAndy Fiddamanthe powers of a super-user as well. 889