help-make
[Top][All Lists]
Advanced

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

problem (bug?) with file descriptors when doing parallel make (make -j 2


From: Fithian, Craig [IT]
Subject: problem (bug?) with file descriptors when doing parallel make (make -j 2)
Date: Thu, 10 Nov 2005 14:27:09 -0500

I am using make 3.79.1.  With the following makefiles:

makefile

test:
        $(MAKE) -f sub_makefile test 3>&1

sub_makefile

test:
        @echo "some text" >&3


the command 'make' works as expected (prints "some text" to the screen).  The 
command 'make -j' works as well, but the command 'make -j 2' (or any # > 1) 
generates the error "/bin/sh: line 1: 3: Bad file descriptor" and fails.  
Strangely, it appears that when the number of processes is restricted, the 
parallel make is not opening up the necessary file descriptors when it spawns 
processes.

I do not have make 3.80 but I do not see any comments in the News that this bug 
(if it is one) has been addressed between 3.79.1 and 3.80.

Can you confirm whether this is a bug, suggest a workaround where it works 
while restricting the number of processes, and/or give an explanation why the 
behavior is different between the '-j' and '-j 2' options.  

Thanks for any help and advice you can provide.

Craig Fithian


PS: It would be very nice to be able to turn off parallelism by target (as 
opposed to for the whole makefile).
 




reply via email to

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