get rid of eh_frame bloat
[musl] / include / spawn.h
1 #ifndef _SPAWN_H
2 #define _SPAWN_H
3
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7
8 #define __NEED_mode_t
9 #define __NEED_pid_t
10 #define __NEED_sigset_t
11
12 #include <bits/alltypes.h>
13
14 struct sched_param;
15
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
22
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;
29
30 typedef struct {
31         int __pad0[2];
32         void *__actions;
33         int __pad[16];
34 } posix_spawn_file_actions_t;
35
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 []);
40
41 int posix_spawnattr_init(posix_spawnattr_t *);
42 int posix_spawnattr_destroy(posix_spawnattr_t *);
43
44 int posix_spawnattr_setflags(posix_spawnattr_t *, short);
45 int posix_spawnattr_getflags(const posix_spawnattr_t *, short *);
46
47 int posix_spawnattr_setpgroup(posix_spawnattr_t *, pid_t);
48 int posix_spawnattr_getpgroup(const posix_spawnattr_t *, pid_t *);
49
50 int posix_spawnattr_setsigmask(posix_spawnattr_t *, const sigset_t *);
51 int posix_spawnattr_getsigmask(const posix_spawnattr_t *, sigset_t *);
52
53 int posix_spawnattr_setsigdefault(posix_spawnattr_t *, const sigset_t *);
54 int posix_spawnattr_getsigdefault(const posix_spawnattr_t *, sigset_t *);
55
56 int posix_spawn_file_actions_init(posix_spawn_file_actions_t *);
57 int posix_spawn_file_actions_destroy(posix_spawn_file_actions_t *);
58
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);
62
63 #ifdef __cplusplus
64 }
65 #endif
66
67 #endif