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: Mon, 31 Jul 2006 00:45:44 -0400

%% "Philip Guenther" <address@hidden> writes:

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

  pg> On 7/30/06, Paul D. Smith <address@hidden> wrote:

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

  pg> ...which is why fcntl(fd, F_DUPFD, min_fd) exists.  I'm not sure
  pg> when that fnctl() command was first standardized, but I see it in
  pg> the SUSv2 spec...

Correct, fcntl() is the "approved" way to do this now.  However, as you
allude to, it's not nearly as portable as dup2(), even if it is in SUSv2.
For a program like GNU make I'll stick with dup2() I think.

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