Polyfill SIGCHLD on the New Technology

redbean will now cleanup child processes properly. New accounting
information is available too, such as page faults and memory usage. The
way it works is Cosmopolitan Libc samples the process collection on
entry into read() and poll() to see if SIGCHLD needs to be raised.

This change also fixes an issue with chibicc /tmp cleanup. There was
also a regression in MODE=dbg because STL needed ASAN runtime support.
This commit is contained in:
Justine Tunney 2022-03-22 21:04:08 -07:00
parent c23b6ecc31
commit 393ca4be40
18 changed files with 182 additions and 44 deletions

View file

@ -29,7 +29,7 @@ TEST(tmpfile, test) {
FILE *f;
mkdir("doge", 0755);
setenv("TMPDIR", "doge", true);
f = tmpfile();
ASSERT_NE(NULL, (f = tmpfile()));
EXPECT_NE(-1, fputc('t', f));
EXPECT_NE(-1, fflush(f));
rewind(f);