ff4e5c20dc89d72c57e6fa4b1b4e6a65b5a61d74
Ctrl-C killed meowc and left every compiler it had spawned running, still holding CPU and still about to write into the build directory. There were no signal handlers at all. SIGINT and SIGTERM now cancel the same way a build failure does, and the run returns cleanly so the cache is still written and the exit status is 130. A second signal falls through to the default handler, so an unresponsive child cannot trap the user. Signalling a single pid was not enough: a compiler driver spawns its own children, and those were reparented to init and survived. Each action is now placed in its own process group with setsid, and cancellation signals the group, which also makes the existing failure path reach grandchildren. Unix.wait is retried on EINTR so a signal arriving mid-wait is not fatal.
Description
Build tool for C and C++ that derives build graphs/dependencies
2.9 MiB
19 Stars
1 Watchers
1 Forks
Languages
OCaml
87.2%
Shell
12.8%