On 2/15/07, Matthew Burgess <[EMAIL PROTECTED]> wrote:
>
> I'm now wondering why I get the following output from `ps' though:
>
> /bin/bash ./progress_bar.sh 029-gcc-pass1
> /bin/sh -c . ~/.bashrc && /media/hda3/jhalfs/lfs-commands/chapter05
> /bin/bash /media/hda3/jhalfs/lfs-commands/chapter05/029-gcc-pass1
They're all derived from the 029-gcc-pass1 make target. The first one
is because progress_bar.sh has /bin/bash in the shebang and we don't
force it otherwise. Make has done this:
/bin/sh -c "./progress_bar.sh 029-gcc-pass1 &"
This spawns "/bin/bash ./progress_bar.sh 029-gcc-pass1" and /bin/sh
returns immediately because we put it in the background.
On the other hand, when make gets to the part where we actually
execute the package commands (which are in a separate bash script), it
executes the second process as you see from ps. I think it got cut
off, but you should see that it's executing the gcc-pass1 script. The
part that it's currently working on in the { ... && ... } chained
commands is the bash script for 029-gcc-pass1 which uses bash since
it's in the shebang.
Moral of the story is that each command in a make target is spawned
through "$(SHELL) -c 'commands'".
--
Dan
--
http://linuxfromscratch.org/mailman/listinfo/alfs-discuss
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page