uts: make emu10k non-verbose
[unleashed.git] / include / sys / fork.h
blobaa455b35c2f08e6546bdb833bcbb6326dad8fd57
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
19 * CDDL HEADER END
23 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #ifndef _SYS_FORK_H
28 #define _SYS_FORK_H
30 #include <sys/types.h>
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
36 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
38 #if !defined(_KERNEL)
40 extern pid_t forkx(int);
41 extern pid_t forkallx(int);
42 extern pid_t vforkx(int) __RETURNS_TWICE;
44 #pragma unknown_control_flow(vforkx)
46 #endif /* !defined(_KERNEL) */
49 * The argument to any of the forkx() functions is a set of flags
50 * formed by or-ing together zero or more of the following flags.
51 * fork()/forkall()/vfork() are equivalent to the corresponding
52 * forkx()/forkallx()/vforkx() functions with a zero argument.
56 * Do not post a SIGCHLD signal to the parent when the child terminates,
57 * regardless of the disposition of the SIGCHLD signal in the parent.
58 * SIGCHLD signals are still possible for job control stop and continue
59 * actions (CLD_STOPPED, CLD_CONTINUED) if the parent has requested them.
61 #define FORK_NOSIGCHLD 0x0001
64 * Do not allow wait-for-multiple-pids by the parent, as in waitid(P_ALL)
65 * or waitid(P_PGID), to reap the child and do not allow the child to
66 * be reaped automatically due the disposition of the SIGCHLD signal
67 * being set to be ignored. Only a specific wait for the child, as
68 * in waitid(P_PID, pid), is allowed and it is required, else when
69 * the child exits it will remain a zombie until the parent exits.
71 #define FORK_WAITPID 0x0002
73 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
75 #ifdef __cplusplus
77 #endif
79 #endif /* _SYS_FORK_H */