21#ifndef ZEPHYR_INCLUDE_POSIX_SPAWN_H_
22#define ZEPHYR_INCLUDE_POSIX_SPAWN_H_
36#define POSIX_SPAWN_RESETIDS 0x01
41#define POSIX_SPAWN_SETPGROUP 0x02
46#define POSIX_SPAWN_SETSCHEDPARAM 0x04
51#define POSIX_SPAWN_SETSCHEDULER 0x08
56#define POSIX_SPAWN_SETSIGDEF 0x10
61#define POSIX_SPAWN_SETSIGMASK 0x20
63#ifndef __posix_spawnattr_t_defined
64#define __posix_spawnattr_t_defined
74 struct sched_param schedparam;
79#ifndef __posix_spawn_file_actions_t_defined
80#define __posix_spawn_file_actions_t_defined
87 struct posix_spawn_file_action *actions;
161 const char *path,
int oflag,
mode_t mode);
int pid_t
Process ID type.
int mode_t
File permission bits type.
int posix_spawnattr_getschedparam(const posix_spawnattr_t *attr, struct sched_param *schedparam)
Get the scheduling parameter attribute.
int posix_spawnattr_setschedparam(posix_spawnattr_t *attr, const struct sched_param *schedparam)
Set the scheduling parameter attribute, applied with POSIX_SPAWN_SETSCHEDPARAM.
int posix_spawnattr_init(posix_spawnattr_t *attr)
Initialize a spawn attributes object with default values.
int posix_spawnattr_getsigdefault(const posix_spawnattr_t *attr, sigset_t *sigdefault)
Get the default-signals attribute.
int posix_spawn_file_actions_destroy(posix_spawn_file_actions_t *file_actions)
Destroy a file actions object.
int posix_spawnattr_setflags(posix_spawnattr_t *attr, short flags)
Set the POSIX_SPAWN_* flags of a spawn attributes object.
int posix_spawnattr_getflags(const posix_spawnattr_t *attr, short *flags)
Get the POSIX_SPAWN_* flags of a spawn attributes object.
int posix_spawn(pid_t *pid, const char *path, const posix_spawn_file_actions_t *file_actions, const posix_spawnattr_t *attrp, char *const argv[], char *const envp[])
Spawn a new process from the executable image named by path.
int posix_spawn_file_actions_addopen(posix_spawn_file_actions_t *file_actions, int fildes, const char *path, int oflag, mode_t mode)
Add an open action in the child, opening path as descriptor fildes.
int posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t *file_actions, int fildes, int newfildes)
Add a dup2 action in the child, duplicating fildes onto newfildes.
int posix_spawnattr_getschedpolicy(const posix_spawnattr_t *attr, int *schedpolicy)
Get the scheduling policy attribute.
int posix_spawn_file_actions_init(posix_spawn_file_actions_t *file_actions)
Initialize a file actions object with no actions.
int posix_spawnattr_getpgroup(const posix_spawnattr_t *attr, pid_t *pgroup)
Get the process group attribute.
int posix_spawnattr_setsigdefault(posix_spawnattr_t *attr, const sigset_t *sigdefault)
Set the default-signals attribute, applied with POSIX_SPAWN_SETSIGDEF.
int posix_spawn_file_actions_addclose(posix_spawn_file_actions_t *file_actions, int fildes)
Add a close action for descriptor fildes in the child.
int posix_spawnattr_setsigmask(posix_spawnattr_t *attr, const sigset_t *sigmask)
Set the signal mask attribute, applied with POSIX_SPAWN_SETSIGMASK.
int posix_spawnattr_setpgroup(posix_spawnattr_t *attr, pid_t pgroup)
Set the process group attribute, applied with POSIX_SPAWN_SETPGROUP.
int posix_spawnp(pid_t *pid, const char *file, const posix_spawn_file_actions_t *file_actions, const posix_spawnattr_t *attrp, char *const argv[], char *const envp[])
Spawn a new process, resolving file as posix_spawn() resolves a path.
int posix_spawnattr_getsigmask(const posix_spawnattr_t *attr, sigset_t *sigmask)
Get the signal mask attribute.
int posix_spawnattr_setschedpolicy(posix_spawnattr_t *attr, int schedpolicy)
Set the scheduling policy attribute, applied with POSIX_SPAWN_SETSCHEDULER.
int posix_spawnattr_destroy(posix_spawnattr_t *attr)
Destroy a spawn attributes object.
POSIX process and thread scheduling API (<sched.h>)
Ordered list of file actions performed in the child, initialized with posix_spawn_file_actions_init()...
Spawn attributes object, initialized with posix_spawnattr_init().
Set of signals (bitmask).
POSIX fundamental types (<sys/types.h>)