/bin/sh calls tee which never exits

James McDonald james
Wed Mar 21 23:15:32 PDT 2007

Bill Campbell wrote:
> On Thu, Mar 22, 2007, James McDonald wrote:
>> I have an issue with a backup script on a Redhat EL3.1 box
>> Until recently it worked fine but now that a new command has been added 
>> in the form of:
>> program_to_execute "program args" 2>redirect_to_file &
>> I am having to kill the tee -a $LOG process called as shown in the tree 
>> below to let it complete
> It appears that $program_to_execute is a script that contains the
> tee command.
In the ascii picture I sent everything with a dot in it's name is a bash 
script. The tee command is called from backup.sh which is calling 
start_all.sh | tee -a $LOG and start_all.sh then calls all the scripts 
underneath it. Finally calling a Progress binary which has it's stderr 
diverted to a file and is backgrounded. Eventually all those scripts 
should return Since this new process has started being called it appears 
tee is just hanging.... waiting for any stdout which might come from the 
backgrounded progress process.

        \_ start_all.sh | tee -a $LOG
            \_ start_test.sh
                \_ db_start.sh
                    \_ start_qpstest.sh
                                \_$DLC/bin/_progres \
                                            -rereadnolock -c 30 -d mdy 
-yy 1920 \
                                            -Bt 350 -D 100 -mmax 3000 
-nb 200 -s 128 \
                                            -noshvarfix -pf 
/usr/local/bin/TEST.pf \
                                            -b -p 
/u4/app/qad/eb2sp9/qps/scheduler/synch/autosynch.p \
                                            -param userid="QPS" 
2>autosynch.QPS.err &

More information about the Linux-users mailing list