summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xrunjobsparallel.in11
1 files changed, 5 insertions, 6 deletions
diff --git a/runjobsparallel.in b/runjobsparallel.in
index 2a7f62a..1e5648c 100755
--- a/runjobsparallel.in
+++ b/runjobsparallel.in
@@ -20,7 +20,7 @@ for file in ./*; do
if [ -f $file ] && [ -x $file ]; then
i=${#errFiles[@]}
errFiles[${i}]="${tmpDir}/err.${i}"
- (nice -n 19 $file; echo $? > ${errFiles[${i}]})&
+ (nice -n 19 $file; echo $? > "${errFiles[${i}]}")&
pids[${i}]=$!
fi
done
@@ -34,15 +34,14 @@ do
for ((i=0; i<${#errFiles[@]}; i++))
do
pkill -0 "${pids[${i}]}" \
+ && [ ! -r "${errFiles[${i}]}" ] \
&& laeuftNoch=true \
|| laeuftNoch=false
- if [ -r ${errFiles[${i}]} ]
- then
+ if [ -r "${errFiles[${i}]}" ]; then
curErr=$(cat "${errFiles[${i}]}")
[ ${curErr} -gt ${maxErr} ] && maxErr=${curErr}
- elif ${laeuftNoch}
- then
+ elif ${laeuftNoch}; then
allesDa=false
else
echo 255 > "${errFiles[${i}]}"
@@ -51,7 +50,7 @@ do
done
done
-rm -rf ${tmpDir}
+rm -rf "${tmpDir}"
exit ${maxErr}