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