Hi all.

A recent problem (xorg build attempting to overwrite fontconfig configuration 
files) led me to investigate further.  I believe the problem arises because 
I'm attempting to use the routine improperly.

The build script calls three functions configure_commands(), make_commands() 
and install_commands().  This is cool.

However they are called thus
{ function 3>&1 1>&2 2>&3 | tee function.err ; } &> function.log

I read this is as

in the current shell '{}'

call function redirecting stderr from the function to function.err, and both 
stderr and stdout to function.log.

However, the  bash man page states:

'Each command in a pipeline is executed as a separate process (i.e., in a 
subshell). '

This is NOT a problem, unless one of the functions sets a variable, or cd's to 
a directory (typically in the configure_commands function, the way I use it 
at least), and the variable needs to be accessible later, or later commands 
need to be executed in the new directory.

I'm attempting to find a similar construct which will execute in the current 
shell (no pipe to tee).

In the meantime, if anyone could inform me as to where I'm going wrong, I 
would be grateful.

I would like to log *all* the build commands, with the current methodology 
(stderr -> file.err and stdout+stderr -> file.log).  Otherwise, the easy 
solution for me is to place any such commands outside the function call group 
commands (if you catch my drift)
-- 
Serenity through viciousness.
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to