cosmopolitan/libc/log
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
..
addr2linepath.c Make improvements 2023-09-18 21:04:47 -07:00
appendresourcereport.c Make improvements 2023-09-18 21:04:47 -07:00
appendresourcereport.internal.h Pay off more technical debt 2022-09-12 23:36:56 -07:00
attachdebugger.c Fix warnings 2023-09-01 20:50:18 -07:00
backtrace.internal.h Optimize memory layout 2022-09-12 04:26:52 -07:00
backtrace2.c Make improvements 2023-10-08 08:59:53 -07:00
backtrace3.c Make improvements 2023-09-18 21:04:47 -07:00
bsd.h Add script.com and whois.com courtesy of FreeBSD 2022-09-13 20:26:13 -07:00
check.h Fix bugs in cosmocc toolchain 2023-06-08 23:44:03 -07:00
checkaligned.c Pay off more technical debt 2022-09-12 23:36:56 -07:00
checkfail.c Make improvements 2023-09-21 07:30:39 -07:00
checkfail_ndebug.c Make improvements for Actually Portable Emacs 2023-08-19 06:44:58 -07:00
color.internal.h Make exciting improvements 2022-03-18 03:02:00 -07:00
commandvenv.c Make improvements 2023-09-06 12:34:59 -07:00
countbranch.h Introduce native support for MacOS ARM64 2023-05-20 04:17:03 -07:00
countbranch_data.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
countbranch_report.c Get llama.com building as an aarch64 native binary 2023-05-10 04:20:47 -07:00
countexpr.h Introduce native support for MacOS ARM64 2023-05-20 04:17:03 -07:00
countexpr_data.S Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
countexpr_report.c Mint APE Loader v1.5 2023-07-26 13:54:49 -07:00
cxaprintexits.c Pay off more technical debt 2022-09-12 23:36:56 -07:00
die.c Make improvements 2023-10-03 06:17:16 -07:00
err.c Disable linker map generation and improve tinyness 2023-06-09 03:29:26 -07:00
flogf.c Change license 2020-12-27 17:18:44 -08:00
gdb.h Make improvements 2023-09-18 21:04:47 -07:00
gdbexec.c Fix warnings 2023-09-01 20:50:18 -07:00
gdbpath.c Change license 2020-12-27 17:18:44 -08:00
gdbsync.c Remove _Hide keyword 2023-07-24 08:34:58 -07:00
getcallername.c Fix warnings 2023-09-01 20:50:18 -07:00
getcallername.internal.h Pay off more technical debt 2022-09-12 23:36:56 -07:00
internal.h Improve stack overflow recovery 2023-10-04 07:35:17 -07:00
leaks.c Make improvements 2023-09-18 21:04:47 -07:00
libfatal.internal.h Overhaul process spawning 2023-09-10 08:17:44 -07:00
log.h Improve performance and remove fd leaks 2023-09-10 11:52:03 -07:00
log.mk Make improvements 2023-09-18 21:04:47 -07:00
log_exit.c Make improvements for Actually Portable Emacs 2023-08-19 06:44:58 -07:00
log_get_errno.c Get GCC to mostly build with Cosmo 2023-06-09 06:41:34 -07:00
log_retrace.c Get GCC to mostly build with Cosmo 2023-06-09 06:41:34 -07:00
log_set_errno.c Get GCC to mostly build with Cosmo 2023-06-09 06:41:34 -07:00
log_untrace.c Get GCC to mostly build with Cosmo 2023-06-09 06:41:34 -07:00
logerrno.c Remove printf() linking hack 2023-06-17 10:13:50 -07:00
logfile.c Make progress towards aarch64 build 2023-05-10 04:20:46 -07:00
loglevel.c Get LIBC_TESTLIB building on AARCH64 2023-05-11 19:57:09 -07:00
meminfo.c Remove printf() linking hack 2023-06-17 10:13:50 -07:00
memlog.c Mint APE Loader v1.5 2023-07-26 13:54:49 -07:00
memsummary.c Fix warnings 2023-09-01 20:50:18 -07:00
minicrash.c Make improvements 2023-10-03 06:17:16 -07:00
oncrash_amd64.c Make improvements 2023-09-18 21:04:47 -07:00
oncrash_arm64.c Make improvements 2023-10-08 08:59:53 -07:00
printwindowsmemory.c Fix warnings 2023-09-01 20:50:18 -07:00
rop.internal.h Introduce #include <cosmo.h> to toolchain users 2023-06-09 18:03:05 -07:00
showcrashreports.c Improve stack overflow recovery 2023-10-04 07:35:17 -07:00
showcrashreportsearly.S Mint APE Loader v1.5 2023-07-26 13:54:49 -07:00
startfatal.c Further improve fatcosmocc 2023-08-13 01:51:39 -07:00
traceme.c Undiamond Python headers 2021-08-12 14:07:40 -07:00
traceme.h Undiamond Python headers 2021-08-12 14:07:40 -07:00
vflogf.c Make improvements 2023-10-08 08:59:53 -07:00
watch-hook.S Make improvements 2022-08-15 15:20:36 -07:00
watch.c Fix warnings 2023-09-01 20:50:18 -07:00