bug-make
[Top][All Lists]
Advanced

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

Re: I encounter a problem


From: Paul D. Smith
Subject: Re: I encounter a problem
Date: Fri, 7 Jun 2002 00:21:26 -0400

%% jie zhang <address@hidden> writes:

  jz>   I wrote two shell scripts,
  jz>     while1:while echo -n;do echo  while1;done
  jz>     while2:while echo -n;do echo  while2;done
  jz>   and a Makefile,like this
  jz>           test:
  jz>           . while1;\
  jz>           . while2
  jz>     Then I run 'make -j 2',when I use 'ps -e' to view
  jz> active process,I found two 'sh' process.I think I
  jz> should only see one 'sh' process,because I use ';' to
  jz> split two command.Why I saw two process?

Whether you put these together with backslash/newline or not, they will
never be run in parallel.

Make never runs multiple command lines in the same target build script
in parallel; that would be disastrous.

I can't say what's going on in your case: I tried what you did and I saw
only one shell invoked, just as you'd expect:

 psmith    8852  8851 73 00:18 pts/2    00:00:01 /bin/sh -c . while1; . while2


Maybe the other shell you're seeing is doing something else, or from a
previous invocation that's still running.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://www.paulandlesley.org/gmake/
 "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]