[PATCH STABLE] worker: wait worker pid explicitly

Jun Wu quark at fb.com
Sat Jul 23 14:34:36 EDT 2016


Excerpts from Yuya Nishihara's message of 2016-07-23 23:39:54 +0900:
> New implementation can't detect failures ASAP, which is what 9955fc5ee24b
> tried to solve.
> 
> https://selenic.com/repo/hg/rev/9955fc5ee24b

It seems SIGCHLD handler + waitpid WNOHANG is the solution then.

> Somewhat related, maybe we can handle this issue by worker-to-master pipe?
> 
> https://bz.mercurial-scm.org/show_bug.cgi?id=4929#c9 

That sounds like a complex solution with a downside: the workers can be
blocked if the master process does not read fast enough.

Maybe we can just disable stdio buffer or make it flush at '\n'. It does not
work for long line exceeding page size tho.


More information about the Mercurial-devel mailing list