[PATCH 5 of 5 STABLE V2] worker: add a SIGCHLD handler

Jun Wu quark at fb.com
Thu Aug 4 16:15:13 UTC 2016


Excerpts from Yuya Nishihara's message of 2016-07-29 23:20:06 +0900:
> and drop use of threading?

I checked the signal handler code gets executed when waiting for I/O. So
it's fine to drop the thread. I will remove the thread.

> waitforworkers() updates problems[0] non-atomically.

This may be not easy to solve - threading.Lock will cause dead-lock for
reentrant signals. I guess it's fine to leave it non-atomic: it picks
a random (not the first) failure exit code and sends the kill signal
multiple times. Assuming the OS does not reuse pid fast, it looks fine.


More information about the Mercurial-devel mailing list