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

@ -306,6 +306,8 @@ int ioctl_tiocgwinsz_nt(struct Fd *, struct winsize *) hidden;
cosmopolitan § syscalls » windows nt » support
*/
bool _check_sigchld(void) hidden;
int __sample_pids(int[hasatleast 64], int64_t[hasatleast 64]) hidden;
bool isdirectory_nt(const char *) hidden;
bool isregularfile_nt(const char *) hidden;
bool issymlink_nt(const char *) hidden;