12 #define __NEED_sigset_t
14 #include <bits/alltypes.h>
18 #define POSIX_SPAWN_RESETIDS 1
19 #define POSIX_SPAWN_SETPGROUP 2
20 #define POSIX_SPAWN_SETSIGDEF 4
21 #define POSIX_SPAWN_SETSIGMASK 8
22 #define POSIX_SPAWN_SETSCHEDPARAM 16
23 #define POSIX_SPAWN_SETSCHEDULER 32
24 #define POSIX_SPAWN_USEVFORK 64
25 #define POSIX_SPAWN_SETSID 128
30 sigset_t __def
, __mask
;
33 char __pad
[64-sizeof(void *)];
40 } posix_spawn_file_actions_t
;
42 int posix_spawn(pid_t
*__restrict
, const char *__restrict
, const posix_spawn_file_actions_t
*,
43 const posix_spawnattr_t
*__restrict
, char *const *__restrict
, char *const *__restrict
);
44 int posix_spawnp(pid_t
*__restrict
, const char *__restrict
, const posix_spawn_file_actions_t
*,
45 const posix_spawnattr_t
*__restrict
, char *const *__restrict
, char *const *__restrict
);
47 int posix_spawnattr_init(posix_spawnattr_t
*);
48 int posix_spawnattr_destroy(posix_spawnattr_t
*);
50 int posix_spawnattr_setflags(posix_spawnattr_t
*, short);
51 int posix_spawnattr_getflags(const posix_spawnattr_t
*__restrict
, short *__restrict
);
53 int posix_spawnattr_setpgroup(posix_spawnattr_t
*, pid_t
);
54 int posix_spawnattr_getpgroup(const posix_spawnattr_t
*__restrict
, pid_t
*__restrict
);
56 int posix_spawnattr_setsigmask(posix_spawnattr_t
*__restrict
, const sigset_t
*__restrict
);
57 int posix_spawnattr_getsigmask(const posix_spawnattr_t
*__restrict
, sigset_t
*__restrict
);
59 int posix_spawnattr_setsigdefault(posix_spawnattr_t
*__restrict
, const sigset_t
*__restrict
);
60 int posix_spawnattr_getsigdefault(const posix_spawnattr_t
*__restrict
, sigset_t
*__restrict
);
62 int posix_spawnattr_setschedparam(posix_spawnattr_t
*__restrict
, const struct sched_param
*__restrict
);
63 int posix_spawnattr_getschedparam(const posix_spawnattr_t
*__restrict
, struct sched_param
*__restrict
);
64 int posix_spawnattr_setschedpolicy(posix_spawnattr_t
*, int);
65 int posix_spawnattr_getschedpolicy(const posix_spawnattr_t
*__restrict
, int *__restrict
);
67 int posix_spawn_file_actions_init(posix_spawn_file_actions_t
*);
68 int posix_spawn_file_actions_destroy(posix_spawn_file_actions_t
*);
70 int posix_spawn_file_actions_addopen(posix_spawn_file_actions_t
*__restrict
, int, const char *__restrict
, int, mode_t
);
71 int posix_spawn_file_actions_addclose(posix_spawn_file_actions_t
*, int);
72 int posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t
*, int, int);