help-make
[Top][All Lists]
Advanced

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

Re: Advanced Auto-Dependency Generation and Parallel Execution


From: Philip Guenther
Subject: Re: Advanced Auto-Dependency Generation and Parallel Execution
Date: Mon, 1 Dec 2008 06:30:56 -0800

On Sun, Nov 30, 2008 at 12:17 AM, Josh Davidson <address@hidden> wrote:
> However, I'm wondering if the use of sed in creating the dependency files
> could create potential problems under parallel builds (-j).
...
> "Another problem is that two processes cannot both take input from the same
> device; so to make sure that only one command tries to take input from the
> terminal at once, make will invalidate the standard input streams of all but
> one running command. This means that attempting to read from standard input
> will usually be a fatal error (a `Broken pipe' signal) for most child
> processes if there are several.

This is referring to attempting to read from the standard input that
was supplied to make and therefore inherited by default by the
commands make runs.  If a command closes that and opens some other
file as stdin, then parallel execution won't have a problem.

Here's an example that _would_ have a problem:

all: foo bar
foo bar: FORCE
        @echo "touch address@hidden"; read touch; case $$touch in [yY]*) touch 
$@;; esac
FORCE:


Philip Guenther




reply via email to

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