[PATCH STABLE] worker: wait worker pid explicitly
Matt Mackall
mpm at selenic.com
Thu Jul 28 12:46:11 EDT 2016
On Thu, 2016-07-28 at 22:01 +0900, Yuya Nishihara wrote:
> On Wed, 27 Jul 2016 14:43:17 -0500, Matt Mackall wrote:
> >
> > On Wed, 2016-07-27 at 11:09 +0100, Jun Wu wrote:
> > >
> > > Excerpts from Matt Mackall's message of 2016-07-25 16:18:02 -0500:
> > > >
> > > > On Sat, 2016-07-23 at 19:34 +0100, Jun Wu wrote:
> > > > >
> > > > > 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.
> > > > Can you take a stab at this variant?
> > > Will send the patch after freeze.
> > I would say this constitutes a freeze-worthy fix, if you can fit it in.
> Perhaps the minimal patch would be to wait until all pids are reaped,
> something
> like this:
>
> while knownpids:
> try:
> pid, st = os.wait()
> except ...
> # catch ECHILD
> if pid not in knownpids:
> continue
> knownpids.remove(pid)
Sounds great.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel
mailing list