bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EAGAIN in "read jobs pipe"


From: Paul Smith
Subject: Re: EAGAIN in "read jobs pipe"
Date: Tue, 09 Jan 2007 09:10:54 -0500

On Tue, 2007-01-09 at 10:32 +0000, James Coleman wrote:
> Ken Takusagawa wrote:
> > For reasons I haven't completely triaged yet, I've been having my
> > parallel makes die with
> > "read jobs pipe: Resource temporarily unavailable.  Stop."
> 
> All memory on machine might be used up (real memory + all swap).

I don't think this can be the case.  In a standard POSIX system a buffer
is allocated to the pipe when it's created.  There's no need to get more
memory when writing to or reading from the pipe.  Further, GNU make
simply writes one byte to the pipe for each possible job, so as long as
you're not using -j65536 or something silly like that it's unlikely to
be a problem.

Really, I can't think of why you might get that error on a pipe.  In
fact, according to the POSIX spec the ONLY time you're allowed to get
EAGAIN from a read(2) are:

  The O_NONBLOCK flag is set for the file descriptor and the thread would be 
delayed.

Since we are not setting O_NONBLOCK on the pipe FD, it should not be
possible (according to POSIX) to get back EAGAIN.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist




reply via email to

[Prev in Thread] Current Thread [Next in Thread]