respawn workers: tiny fixes
This commit is contained in:
parent
87ff257cf0
commit
5358613888
5
atom
5
atom
@ -1232,7 +1232,6 @@ encodeFile::vorbis() {
|
|||||||
|
|
||||||
worker() {
|
worker() {
|
||||||
trap "kill -USR1 $masterpid" EXIT
|
trap "kill -USR1 $masterpid" EXIT
|
||||||
set +e
|
|
||||||
while :
|
while :
|
||||||
do
|
do
|
||||||
echo work
|
echo work
|
||||||
@ -1546,6 +1545,7 @@ checkworkers() {
|
|||||||
workers[key]=$!
|
workers[key]=$!
|
||||||
eval exec $((100+key))'>"$tempdir"/worker${key}in'
|
eval exec $((100+key))'>"$tempdir"/worker${key}in'
|
||||||
eval exec $((200+key))'<"$tempdir"/worker${key}out'
|
eval exec $((200+key))'<"$tempdir"/worker${key}out'
|
||||||
|
(( ++failed ))
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
@ -1570,7 +1570,6 @@ then
|
|||||||
fi
|
fi
|
||||||
getConfig
|
getConfig
|
||||||
|
|
||||||
set -e
|
|
||||||
set +H
|
set +H
|
||||||
if (( debug ))
|
if (( debug ))
|
||||||
then
|
then
|
||||||
@ -1993,7 +1992,7 @@ echo 'COMMIT;' >&3
|
|||||||
echo -e "\rCreated ${count:-0} tasks for $filecount files (${copies:-0} immediate copies)"
|
echo -e "\rCreated ${count:-0} tasks for $filecount files (${copies:-0} immediate copies)"
|
||||||
|
|
||||||
masterpid=$$
|
masterpid=$$
|
||||||
trap checkworkers USR1
|
trap checkworkers USR1 ALRM
|
||||||
rm -f "$tempdir"/worker*
|
rm -f "$tempdir"/worker*
|
||||||
concurrency=$(( maxload / 2 ))
|
concurrency=$(( maxload / 2 ))
|
||||||
(( concurrency )) || concurrency=1
|
(( concurrency )) || concurrency=1
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user