help-make
[Top][All Lists]
Advanced

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

Re: Problem with parallel make


From: Paul D. Smith
Subject: Re: Problem with parallel make
Date: Sun, 30 Jul 2006 10:40:31 -0400

%% David Boyce <address@hidden> writes:

  db> I have something like this in my code. What I chose to do, rather 
  db> than try to determine the max fd, was to pick a number north of (say) 
  db> 50 and south of 256. I try to dup to that and then, if it fails, the 
  db> next 10 values or so (or I guess you could go to 257 or 1025 if so 
  db> inclined). If none of them works, I just drop back to using what the 
  db> OS gave me. ISTM the odds of of this not working are very low and 
  db> even if it doesn't you're no worse off.

True.

  db> Here's the relevant code (seeing it again for the first time in a 
  db> while, I think the lseek is redundant).

No, it's not.  If the target FD is open then dup2() will unceremoniously
close it before dup'ing it.

Not good.

-- 
-------------------------------------------------------------------------------
 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]