cosmopolitan/libc/calls/struct
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
..
aarch64.internal.h Hunt down more bugs 2023-07-03 18:43:29 -07:00
bpf.internal.h Introduce #include <cosmo.h> to toolchain users 2023-06-09 18:03:05 -07:00
cpuset.h Make more compatibility improvements 2022-09-06 07:04:13 -07:00
dirent.h Make improvements 2023-09-06 12:34:59 -07:00
fd.internal.h Make improvements 2023-10-08 08:59:53 -07:00
filter.internal.h Fix warnings 2023-09-01 20:50:18 -07:00
flock.h Make fixes and improvements 2022-10-19 07:19:19 -07:00
flock.internal.h Elevate Windows production worthiness 2022-10-13 13:44:41 -07:00
framebuffercolormap.h Add some definitions for Linux frame buffer/console ioctl APIs (#712) 2023-01-01 16:28:03 -08:00
framebufferfixedscreeninfo.h Initial import 2020-06-15 07:18:57 -07:00
framebuffervirtualscreeninfo.h Initial import 2020-06-15 07:18:57 -07:00
fsid.h Add lchown, lchmod, statvfs, fstatvfs 2022-08-22 20:50:16 -07:00
iovec.h Greatly expand system() shell code features 2022-10-11 21:30:31 -07:00
iovec.internal.h Make the Windows Console work better 2023-09-07 18:27:22 -07:00
itimerval.h Reduce build graph by another eight percent 2022-08-13 13:11:56 -07:00
itimerval.internal.h Remove _Hide keyword 2023-07-24 08:34:58 -07:00
metasigaltstack.h Improve memory safety 2021-10-13 17:27:13 -07:00
metastat.internal.h Remove _Hide keyword 2023-07-24 08:34:58 -07:00
metatermios.internal.h Fix bugs in termios library and cleanup code 2023-06-14 19:30:52 -07:00
rlimit.h Reduce build graph by another eight percent 2022-08-13 13:11:56 -07:00
rlimit.internal.h Remove _Hide keyword 2023-07-24 08:34:58 -07:00
rusage.h Improve cancellations, randomness, and time 2022-11-05 23:45:32 -07:00
rusage.internal.h Remove _Hide keyword 2023-07-24 08:34:58 -07:00
sched_param.h Make more ML improvements 2023-05-16 08:07:23 -07:00
sched_param.internal.h Reduce build graph by another eight percent 2022-08-13 13:11:56 -07:00
seccomp.internal.h Introduce #include <cosmo.h> to toolchain users 2023-06-09 18:03:05 -07:00
sigaction.h Make improvements 2023-10-08 08:59:53 -07:00
sigaction.internal.h Rewrite Windows console input handling 2023-09-19 11:53:27 -07:00
sigaltstack.h Improve memory safety 2021-10-13 17:27:13 -07:00
sigaltstack.internal.h Reduce build graph by another eight percent 2022-08-13 13:11:56 -07:00
siginfo-freebsd.internal.h Improve signals and memory protection 2022-04-12 22:11:00 -07:00
siginfo-meta.internal.h Remove _Hide keyword 2023-07-24 08:34:58 -07:00
siginfo-netbsd.internal.h Improve signals and memory protection 2022-04-12 22:11:00 -07:00
siginfo-openbsd.internal.h Make improvements 2023-09-18 21:04:47 -07:00
siginfo-xnu.internal.h Improve signals and memory protection 2022-04-12 22:11:00 -07:00
siginfo.h Make improvements 2023-09-18 21:04:47 -07:00
siginfo.internal.h Remove _Hide keyword 2023-07-24 08:34:58 -07:00
sigset.h Make improvements 2023-10-08 08:59:53 -07:00
sigset.internal.h Make improvements 2023-10-08 08:59:53 -07:00
sigval.h Reduce build graph by another eight percent 2022-08-13 13:11:56 -07:00
sigval.internal.h Remove _Hide keyword 2023-07-24 08:34:58 -07:00
stat.h Reduce build graph by another eight percent 2022-08-13 13:11:56 -07:00
stat.internal.h Remove _Hide keyword 2023-07-24 08:34:58 -07:00
stat.macros.h Make some foss compatibility improvements 2022-10-14 13:59:34 -07:00
statfs-freebsd.internal.h Add lchown, lchmod, statvfs, fstatvfs 2022-08-22 20:50:16 -07:00
statfs-linux.internal.h Make some system call fixes 2023-02-12 22:16:34 -08:00
statfs-meta.internal.h Remove _Hide keyword 2023-07-24 08:34:58 -07:00
statfs-netbsd.internal.h Add lchown, lchmod, statvfs, fstatvfs 2022-08-22 20:50:16 -07:00
statfs-openbsd.internal.h Add lchown, lchmod, statvfs, fstatvfs 2022-08-22 20:50:16 -07:00
statfs-xnu.internal.h Add lchown, lchmod, statvfs, fstatvfs 2022-08-22 20:50:16 -07:00
statfs.h Add lchown, lchmod, statvfs, fstatvfs 2022-08-22 20:50:16 -07:00
statfs.internal.h Add lchown, lchmod, statvfs, fstatvfs 2022-08-22 20:50:16 -07:00
statvfs.h Add lchown, lchmod, statvfs, fstatvfs 2022-08-22 20:50:16 -07:00
sysinfo.h Fix sysinfo() totalram on XNU 2022-12-18 02:22:46 -08:00
sysinfo.internal.h Remove _Hide keyword 2023-07-24 08:34:58 -07:00
termios.h Fix bugs in termios library and cleanup code 2023-06-14 19:30:52 -07:00
termios.internal.h Fix warnings 2023-09-01 20:50:18 -07:00
timespec.h Fix warnings 2023-09-01 20:50:18 -07:00
timespec.internal.h Make improvements 2023-10-03 06:17:16 -07:00
timeval.h Make the Windows Console work better 2023-09-07 18:27:22 -07:00
timeval.internal.h Make improvements 2023-10-03 06:17:16 -07:00
tms.h Reduce build graph by another eight percent 2022-08-13 13:11:56 -07:00
ucontext-freebsd.internal.h Make improvements 2022-11-07 02:26:06 -08:00
ucontext-netbsd.internal.h Work on magic numbers for aarch64 2023-05-10 04:20:48 -07:00
ucontext-openbsd.internal.h Make improvements 2023-10-08 08:59:53 -07:00
ucontext.internal.h Remove _Hide keyword 2023-07-24 08:34:58 -07:00
user_regs_struct.h Remove dollars from system call support symbols 2021-02-03 19:35:29 -08:00
utsname-linux.internal.h Improve quality of uname/gethostname/getdomainname 2022-09-03 20:20:40 -07:00
utsname.h Add pthread attributes and other libc functions 2022-09-07 05:28:32 -07:00
winsize.h Fix bugs in termios library and cleanup code 2023-06-14 19:30:52 -07:00
winsize.internal.h Fix warnings 2023-09-01 20:50:18 -07:00