first attempt at enabling stack protector support
[musl.git] / include / spawn.h
blob99ec6f1d59113d8b4f18acab7771522f589fa785
1 #ifndef _SPAWN_H
2 #define _SPAWN_H
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
8 #define __NEED_mode_t
9 #define __NEED_pid_t
10 #define __NEED_sigset_t
12 #include <bits/alltypes.h>
14 struct sched_param;
16 #define POSIX_SPAWN_RESETIDS 1
17 #define POSIX_SPAWN_SETPGROUP 2
18 #define POSIX_SPAWN_SETSIGDEF 4
19 #define POSIX_SPAWN_SETSIGMASK 8
20 #define POSIX_SPAWN_SETSCHEDPARAM 16
21 #define POSIX_SPAWN_SETSCHEDULER 32
23 typedef struct {
24 int __flags;
25 pid_t __pgrp;
26 sigset_t __def, __mask;
27 int __prio, __pol, __pad[16];
28 } posix_spawnattr_t;
30 typedef struct {
31 int __pad0[2];
32 void *__actions;
33 int __pad[16];
34 } posix_spawn_file_actions_t;
36 int posix_spawn(pid_t *, const char *, const posix_spawn_file_actions_t *,
37 const posix_spawnattr_t *, char *const [], char *const []);
38 int posix_spawnp(pid_t *, const char *, const posix_spawn_file_actions_t *,
39 const posix_spawnattr_t *, char *const [], char *const []);
41 int posix_spawnattr_init(posix_spawnattr_t *);
42 int posix_spawnattr_destroy(posix_spawnattr_t *);
44 int posix_spawnattr_setflags(posix_spawnattr_t *, short);
45 int posix_spawnattr_getflags(const posix_spawnattr_t *, short *);
47 int posix_spawnattr_setpgroup(posix_spawnattr_t *, pid_t);
48 int posix_spawnattr_getpgroup(const posix_spawnattr_t *, pid_t *);
50 int posix_spawnattr_setsigmask(posix_spawnattr_t *, const sigset_t *);
51 int posix_spawnattr_getsigmask(const posix_spawnattr_t *, sigset_t *);
53 int posix_spawnattr_setsigdefault(posix_spawnattr_t *, const sigset_t *);
54 int posix_spawnattr_getsigdefault(const posix_spawnattr_t *, sigset_t *);
56 int posix_spawn_file_actions_init(posix_spawn_file_actions_t *);
57 int posix_spawn_file_actions_destroy(posix_spawn_file_actions_t *);
59 int posix_spawn_file_actions_addopen(posix_spawn_file_actions_t *, int, const char *, int, mode_t);
60 int posix_spawn_file_actions_addclose(posix_spawn_file_actions_t *, int);
61 int posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t *, int, int);
63 #ifdef __cplusplus
65 #endif
67 #endif