diff options
author | Dieter Plaetinck <dieter@plaetinck.be> | 2008-11-13 19:11:32 +0100 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2008-11-13 19:11:32 +0100 |
commit | 569c2f7f70e33e414c5921fe43ecf9c05d7f7957 (patch) | |
tree | a8affea131af121a9872fe0b54572e5abfaa4456 | |
parent | 783b3409116e619acb3db040d1465804066216a4 (diff) |
fixes to run_background
-rw-r--r-- | src/core/libs/lib-misc.sh | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/core/libs/lib-misc.sh b/src/core/libs/lib-misc.sh index f421af3..b85e151 100644 --- a/src/core/libs/lib-misc.sh +++ b/src/core/libs/lib-misc.sh @@ -17,12 +17,11 @@ run_background () touch /home/arch/fifa/runtime/$1-running debug "run_background starting $1: $2 >>$3 2>&1" [ -f $3 ] && echo -e "\n\n\n" >>$3 - echo "STARTING $1 . Executing $2 >>$3 2>&1" >> $3; \ - echo >> $3; \ - eval "$2" >>$3 2>&1 + echo "STARTING $1 . Executing $2 >>$3 2>&1\n" >> $3; var_exit=${1}_exitcode - read $var_exit <<< $? #TODO: bash complains about 'invalid key' or something iirc - debug "run_background done with $1: exitcode (\$$1_exitcode): "${!var_exit}" .Logfile $3" #TODO ${!var_exit} doesn't show anything + eval "$2" >>$3 2>&1 + read $var_exit <<< $? #TODO: bash complains about 'not a valid identifier' or something iirc -> maybe fixed now.. + debug "run_background done with $1: exitcode (\$$1_exitcode): "${!var_exit}" .Logfile $3" #TODO ${!var_exit} doesn't show anything --> maybe fixed now echo >> $3 rm -f /home/arch/fifa/runtime/$1-running ) & |