Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 292eae6

Browse files
committed
core.sys.posix.spawn: Add DragonFlyBSD bindings
1 parent 5f0626f commit 292eae6

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/core/sys/posix/spawn.d

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ FreeBSD: https://github.com/freebsd/freebsd/blob/master/include/spawn.h
3030
NetBSD: https://github.com/NetBSD/src/blob/trunk/sys/sys/spawn.h
3131
3232
OpenBSD: https://github.com/openbsd/src/blob/master/include/spawn.h
33+
34+
DragonFlyBSD: https://github.com/DragonFlyBSD/DragonFlyBSD/blob/master/include/spawn.h
3335
*/
3436

3537
version (OSX) // macOS and iOS only as this API is prohibited on WatchOS and TVOS
@@ -301,5 +303,22 @@ else version (OpenBSD)
301303
struct __posix_spawnattr;
302304
struct __posix_spawn_file_actions;
303305
}
306+
else version (DragonFlyBSD)
307+
{
308+
// Source: https://github.com/DragonFlyBSD/DragonFlyBSD/blob/master/include/spawn.h
309+
enum
310+
{
311+
POSIX_SPAWN_RESETIDS = 0x01,
312+
POSIX_SPAWN_SETPGROUP = 0x02,
313+
POSIX_SPAWN_SETSCHEDPARAM = 0x04,
314+
POSIX_SPAWN_SETSCHEDULER = 0x08,
315+
POSIX_SPAWN_SETSIGDEF = 0x10,
316+
POSIX_SPAWN_SETSIGMASK = 0x20
317+
}
318+
alias posix_spawnattr_t = __posix_spawnattr*;
319+
alias posix_spawn_file_actions_t = __posix_spawn_file_actions*;
320+
struct __posix_spawnattr;
321+
struct __posix_spawn_file_actions;
322+
}
304323
else
305324
static assert(0, "Unsupported OS");

0 commit comments

Comments
 (0)