Explore comfort level with posix_spawn

Justine says nay for the time being. Only XNU implements this. It's not
clear what ABI XNU is using but it's obviously not the one in the POSIX
documentation link below. Since all platforms implement vfork, it might
be better to empirically gauge the intersection of consensus which will
have better performance than this interface.

https://pubs.opengroup.org/onlinepubs/009696699/xrat/xsh_chap03.html
This commit is contained in:
Justine Tunney 2021-01-29 00:10:06 -08:00
parent b2260c2278
commit f7c7b949fd
13 changed files with 30 additions and 56 deletions

14
libc/calls/scheduler.h Normal file
View file

@ -0,0 +1,14 @@
#ifndef COSMOPOLITAN_LIBC_CALLS_SCHED_H_
#define COSMOPOLITAN_LIBC_CALLS_SCHED_H_
#include "libc/calls/struct/sched_param.h"
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
int sched_setscheduler(int, int, const struct sched_param *);
int sched_getscheduler(int);
int sched_setparam(int, const struct sched_param *);
int sched_getparam(int, struct sched_param *);
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#endif /* COSMOPOLITAN_LIBC_CALLS_SCHED_H_ */