cosmopolitan/libc/isystem
Justine Tunney 791f79fcb3
Make improvements
- We now serialize the file descriptor table when spawning / executing
  processes on Windows. This means you can now inherit more stuff than
  just standard i/o. It's needed by bash, which duplicates the console
  to file descriptor #255. We also now do a better job serializing the
  environment variables, so you're less likely to encounter E2BIG when
  using your bash shell. We also no longer coerce environ to uppercase

- execve() on Windows now remotely controls its parent process to make
  them spawn a replacement for itself. Then it'll be able to terminate
  immediately once the spawn succeeds, without having to linger around
  for the lifetime as a shell process for proxying the exit code. When
  process worker thread running in the parent sees the child die, it's
  given a handle to the new child, to replace it in the process table.

- execve() and posix_spawn() on Windows will now provide CreateProcess
  an explicit handle list. This allows us to remove handle locks which
  enables better fork/spawn concurrency, with seriously correct thread
  safety. Other codebases like Go use the same technique. On the other
  hand fork() still favors the conventional WIN32 inheritence approach
  which can be a little bit messy, but is *controlled* by guaranteeing
  perfectly clean slates at both the spawning and execution boundaries

- sigset_t is now 64 bits. Having it be 128 bits was a mistake because
  there's no reason to use that and it's only supported by FreeBSD. By
  using the system word size, signal mask manipulation on Windows goes
  very fast. Furthermore @asyncsignalsafe funcs have been rewritten on
  Windows to take advantage of signal masking, now that it's much more
  pleasant to use.

- All the overlapped i/o code on Windows has been rewritten for pretty
  good signal and cancelation safety. We're now able to ensure overlap
  data structures are cleaned up so long as you don't longjmp() out of
  out of a signal handler that interrupted an i/o operation. Latencies
  are also improved thanks to the removal of lots of "busy wait" code.
  Waits should be optimal for everything except poll(), which shall be
  the last and final demon we slay in the win32 i/o horror show.

- getrusage() on Windows is now able to report RUSAGE_CHILDREN as well
  as RUSAGE_SELF, thanks to aggregation in the process manager thread.
2023-10-08 08:59:53 -07:00
..
arpa Improve cosmo's conformance to libc-test 2022-10-10 17:52:41 -07:00
linux Make improvements 2023-10-08 08:59:53 -07:00
net Get us closer to building busybox 2023-06-18 04:13:45 -07:00
netinet get rsync to build (#886) 2023-08-16 21:41:36 -07:00
sys Make improvements 2023-10-03 06:17:16 -07:00
algorithm Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
alloca.h Remove some dead code 2023-07-03 02:48:29 -07:00
ammintrin.h Add Intel intrinsics headers 2023-04-27 05:44:38 -07:00
any Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
ar.h Remove some dead code 2023-07-03 02:48:29 -07:00
arm_acle.h Fix some more issues 2023-09-21 11:41:42 -07:00
arm_bf16.h Fix some more issues 2023-09-21 11:41:42 -07:00
arm_fp16.h Fix some more issues 2023-09-21 11:41:42 -07:00
arm_neon.h Fix some more issues 2023-09-21 11:41:42 -07:00
array Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
assert.h Further improve fatcosmocc 2023-08-13 01:51:39 -07:00
atomic Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
bit Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
bitset Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
byteswap.h Clean up more code 2023-06-18 01:00:05 -07:00
cassert Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
ccomplex Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
cctype Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
cerrno Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
cfenv Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
cfloat Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
charconv Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
chrono Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
cinttypes Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
ciso646 Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
climits Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
clocale Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
clzerointrin.h Add Intel intrinsics headers 2023-04-27 05:44:38 -07:00
cmath Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
codecvt Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
compare Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
complex Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
complex.h Clean up more code 2023-06-18 01:00:05 -07:00
condition_variable Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
cosmo.h Get GNU MPFR and MPC tests to pass 2023-08-21 15:05:10 -07:00
cpio.h Clean up more code 2023-06-18 01:00:05 -07:00
cpuid.h Clean up more code 2023-06-18 01:00:05 -07:00
crypt.h Clean up more code 2023-06-18 01:00:05 -07:00
csetjmp Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
csignal Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
cstdarg Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
cstdbool Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
cstddef Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
cstdint Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
cstdio Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
cstdlib Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
cstring Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
ctgmath Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
ctime Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
ctype.h Clean up more code 2023-06-18 01:00:05 -07:00
cwchar Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
cwctype Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
deque Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
dirent.h Clean up more code 2023-06-18 01:00:05 -07:00
dlfcn.h Clean up more code 2023-06-18 01:00:05 -07:00
elf.h Clean up more code 2023-06-18 01:00:05 -07:00
emmintrin.h Add Intel intrinsics headers 2023-04-27 05:44:38 -07:00
endian.h Clean up more code 2023-06-18 01:00:05 -07:00
err.h Clean up more code 2023-06-18 01:00:05 -07:00
errno.h Clean up more code 2023-06-18 01:00:05 -07:00
exception Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
execution Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
fcntl.h Clean up more code 2023-06-18 01:00:05 -07:00
features.h Clean up more code 2023-06-18 01:00:05 -07:00
fenv.h Clean up more code 2023-06-18 01:00:05 -07:00
filesystem Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
float.h Clean up more code 2023-06-18 01:00:05 -07:00
fnmatch.h Clean up more code 2023-06-18 01:00:05 -07:00
forward_list Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
fstream Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
ftw.h Make fixes and improvements 2023-07-09 05:21:11 -07:00
functional Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
getopt.h Fix getopt again 2023-08-15 20:06:19 -07:00
glob.h Clean up more code 2023-06-18 01:00:05 -07:00
grp.h Clean up more code 2023-06-18 01:00:05 -07:00
iconv.h Clean up more code 2023-06-18 01:00:05 -07:00
immintrin.h Add Intel intrinsics headers 2023-04-27 05:44:38 -07:00
initializer_list Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
inttypes.h Clean up more code 2023-06-18 01:00:05 -07:00
iomanip Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
ios Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
iosfwd Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
iostream Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
iso646.h Clean up more code 2023-06-18 01:00:05 -07:00
istream Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
iterator Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
langinfo.h Clean up more code 2023-06-18 01:00:05 -07:00
libgen.h Implement more toolchain fixes 2023-06-18 05:39:31 -07:00
limits Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
limits.h Clean up more code 2023-06-18 01:00:05 -07:00
list Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
locale Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
locale.h Clean up more code 2023-06-18 01:00:05 -07:00
malloc.h Clean up more code 2023-06-18 01:00:05 -07:00
map Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
math.h Clean up more code 2023-06-18 01:00:05 -07:00
memory Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
memory.h Clean up more code 2023-06-18 01:00:05 -07:00
mm3dnow.h Add Intel intrinsics headers 2023-04-27 05:44:38 -07:00
mm_malloc.h Add Intel intrinsics headers 2023-04-27 05:44:38 -07:00
mmintrin.h Add Intel intrinsics headers 2023-04-27 05:44:38 -07:00
mntent.h Make some foss compatibility improvements 2022-10-14 13:59:34 -07:00
monetary.h Greatly expand system() shell code features 2022-10-11 21:30:31 -07:00
mutex Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
mwaitxintrin.h Add Intel intrinsics headers 2023-04-27 05:44:38 -07:00
netdb.h Get us closer to building busybox 2023-06-18 04:13:45 -07:00
new Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
nl_types.h Fold LIBC_UNICODE into LIBC_STR 2022-08-13 08:42:32 -07:00
nmmintrin.h Add Intel intrinsics headers 2023-04-27 05:44:38 -07:00
nsync.h Add *NSYNC to libc/isystem 2022-09-13 01:47:12 -07:00
nsync_atomic.h Add *NSYNC to libc/isystem 2022-09-13 01:47:12 -07:00
nsync_counter.h Add *NSYNC to libc/isystem 2022-09-13 01:47:12 -07:00
nsync_cv.h Add *NSYNC to libc/isystem 2022-09-13 01:47:12 -07:00
nsync_debug.h Add *NSYNC to libc/isystem 2022-09-13 01:47:12 -07:00
nsync_mu.h Add *NSYNC to libc/isystem 2022-09-13 01:47:12 -07:00
nsync_mu_wait.h Add *NSYNC to libc/isystem 2022-09-13 01:47:12 -07:00
nsync_note.h Add *NSYNC to libc/isystem 2022-09-13 01:47:12 -07:00
nsync_once.h Add *NSYNC to libc/isystem 2022-09-13 01:47:12 -07:00
nsync_time.h Add *NSYNC to libc/isystem 2022-09-13 01:47:12 -07:00
nsync_waiter.h Add *NSYNC to libc/isystem 2022-09-13 01:47:12 -07:00
numeric Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
optional Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
ostream Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
paths.h Initial import 2020-06-15 07:18:57 -07:00
pmmintrin.h Add Intel intrinsics headers 2023-04-27 05:44:38 -07:00
poll.h Improve cosmo's conformance to libc-test 2022-10-10 17:52:41 -07:00
popcntintrin.h Add Intel intrinsics headers 2023-04-27 05:44:38 -07:00
pthread.h Improve cosmo's conformance to libc-test 2022-10-10 17:52:41 -07:00
pwd.h Fix isystem headers including wrong files (#108) 2021-03-06 21:06:29 -08:00
queue Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
random Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
ratio Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
regex Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
regex.h Initial import 2020-06-15 07:18:57 -07:00
sched.h Improve cosmo's conformance to libc-test 2022-10-10 17:52:41 -07:00
scoped_allocator Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
semaphore.h Add posix semaphores support 2022-10-14 09:21:02 -07:00
set Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
setjmp.h Clean up more code 2023-06-18 01:00:05 -07:00
sgxintrin.h Add Intel intrinsics headers 2023-04-27 05:44:38 -07:00
signal.h Simplify cosmocc builds (#863) 2023-07-23 11:11:08 -07:00
smmintrin.h Add Intel intrinsics headers 2023-04-27 05:44:38 -07:00
span Make some fixes for libcxx 2023-07-07 19:35:58 -07:00
spawn.h Make improvements 2023-09-18 21:04:47 -07:00
sstream Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
stack Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
stdalign.h Clean up more code 2023-06-18 01:00:05 -07:00
stdarg.h Make the Windows Console work better 2023-09-07 18:27:22 -07:00
stdatomic.h Clean up more code 2023-06-18 01:00:05 -07:00
stdbool.h Make fatcosmocc good enough to build ncurses 6.4 2023-08-12 22:30:05 -07:00
stdc-predef.h Initial import 2020-06-15 07:18:57 -07:00
stdckdint.h Clean up more code 2023-06-18 01:00:05 -07:00
stddef.h Clean up more code 2023-06-18 01:00:05 -07:00
stdexcept Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
stdint.h Clean up more code 2023-06-18 01:00:05 -07:00
stdio.h Make improvements 2023-09-06 12:34:59 -07:00
stdio_ext.h Clean up more code 2023-06-18 01:00:05 -07:00
stdlib.h Make improvements 2023-09-06 12:34:59 -07:00
stdnoreturn.h Clean up more code 2023-06-18 01:00:05 -07:00
streambuf Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
string Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
string.h Clean up more code 2023-06-18 01:00:05 -07:00
string_view Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
strings.h Clean up more code 2023-06-18 01:00:05 -07:00
strstream Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
sysexits.h Clean up more code 2023-06-18 01:00:05 -07:00
syslog.h Clean up more code 2023-06-18 01:00:05 -07:00
system_error Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
termios.h Clean up more code 2023-06-18 01:00:05 -07:00
tgmath.h Clean up more code 2023-06-18 01:00:05 -07:00
thread Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
time.h Clean up more code 2023-06-18 01:00:05 -07:00
tmmintrin.h Add Intel intrinsics headers 2023-04-27 05:44:38 -07:00
tuple Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
type_traits Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
typeindex Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
typeinfo Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
uchar.h Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
uio.h Improve isystem includes and magic numbers 2021-08-14 23:36:36 -07:00
unistd.h Refactor fatcosmocc into a single file 2023-08-14 22:26:17 -07:00
unordered_map Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
unordered_set Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
utility Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
utime.h Clean up more code 2023-06-18 01:00:05 -07:00
utmp.h Clean up more code 2023-06-18 01:00:05 -07:00
utmpx.h Clean up more code 2023-06-18 01:00:05 -07:00
valarray Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
variant Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
vector Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
version Add more missing C / C++ headers 2022-09-04 04:53:52 -07:00
wait.h Clean up more code 2023-06-18 01:00:05 -07:00
wchar.h Add Cosmopolitan to uname() 2023-09-21 23:51:55 -07:00
wctype.h Clean up more code 2023-06-18 01:00:05 -07:00
winternl.h Restore strict header checking 2022-08-13 16:02:01 -07:00
wmmintrin.h Add Intel intrinsics headers 2023-04-27 05:44:38 -07:00
x86intrin.h Add Intel intrinsics headers 2023-04-27 05:44:38 -07:00
xmmintrin.h Add Intel intrinsics headers 2023-04-27 05:44:38 -07:00