NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/47524: make(1) loops in Job_CatchOutput()
The following reply was made to PR bin/47524; it has been noted by GNATS.
From: David Laight <david%l8s.co.uk@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: bin/47524: make(1) loops in Job_CatchOutput()
Date: Tue, 5 Feb 2013 20:55:41 +0000
On Tue, Feb 05, 2013 at 08:00:13AM +0000, Andreas Gustafsson wrote:
> The following reply was made to PR bin/47524; it has been noted by GNATS.
>
> David Laight wrote:
> > I moved the Job_CatchChildren() from being called unconditionally
> > everytime around the loop, to be (usually) only called when a
> > token was read from the pipe.
> >
> > But I didn't want to break the code if it was actually relying on the
> > poll timeout (5 seconds) to collect children.
>
> But in the timeout case, poll() will return 0, not < 0, therefore
> Job_CatchChildren() will in fact *not* be called when there is a
> timeout. It will, however, be called if the poll() system call
> fails. Should the "nready < 0" have been "nready == 0"?
Quite possibly, I think I was just reducing the number of times
Job_CatchChildren() would be called unnecessarily.
The only time this all goes awry is when the number of jobs gets near
to the number of bytes that can be written into a pipe.
The 'job' pipe will just lose credit, you'd have to be very unluky to
lose anywhere else.
David
--
David Laight: david%l8s.co.uk@localhost
Home |
Main Index |
Thread Index |
Old Index