@@ -16,6 +16,8 @@ Glibc: https://sourceware.org/git/?p=glibc.git;a=blob;f=posix/spawn.h;hb=HEAD
16
16
17
17
Bionic libc: https://android.googlesource.com/platform/bionic.git/+/master/libc/include/spawn.h
18
18
19
+ Musl libc: https://git.musl-libc.org/cgit/musl/tree/include/spawn.h
20
+
19
21
Darwin XNU:
20
22
https://opensource.apple.com/source/xnu/xnu-4570.71.2/libsyscall/wrappers/spawn/spawn.h.auto.html
21
23
https://opensource.apple.com/source/xnu/xnu-4570.71.2/bsd/sys/spawn.h.auto.html
@@ -139,6 +141,36 @@ version (linux)
139
141
struct __posix_spawnattr ;
140
142
struct __posix_spawn_file_actions ;
141
143
}
144
+ else version (CRuntime_Musl )
145
+ {
146
+ // Source: https://git.musl-libc.org/cgit/musl/tree/include/spawn.h
147
+ enum
148
+ {
149
+ POSIX_SPAWN_RESETIDS = 1 ,
150
+ POSIX_SPAWN_SETPGROUP = 2 ,
151
+ POSIX_SPAWN_SETSIGDEF = 4 ,
152
+ POSIX_SPAWN_SETSIGMASK = 8 ,
153
+ POSIX_SPAWN_SETSCHEDPARAM = 16 ,
154
+ POSIX_SPAWN_SETSCHEDULER = 32 ,
155
+ POSIX_SPAWN_USEVFORK = 64 ,
156
+ POSIX_SPAWN_SETSID = 128
157
+ }
158
+ struct posix_spawnattr_t
159
+ {
160
+ int __flags;
161
+ pid_t __pgrp;
162
+ sigset_t __def, __mask;
163
+ int __prio, __pol;
164
+ void * __fn;
165
+ char [64 - (void * ).sizeof] __pad;
166
+ }
167
+ struct posix_spawn_file_actions_t
168
+ {
169
+ int [2 ] __pad0;
170
+ void * __actions;
171
+ int [16 ] __pad;
172
+ }
173
+ }
142
174
else
143
175
static assert (0 , " Unsupported Linux libc" );
144
176
}
0 commit comments