Commit 0237658f by Eric Coissac

Patch the signal run function to no more rely on wait

parent 35e2fc46
......@@ -57,7 +57,7 @@ __LECABASH__trap_function__() {
while popvalue "$stackname" cmd ; do
logdebug "Running ${signal} command : $cmd"
eval "$cmd" \
|| logdebug "Command: '$cmd' generates an error"
|| logdebug "Command: '$cmd' generates an error"
done
logdebug "Commands registered on signal $signal run."
fi
......@@ -154,7 +154,12 @@ function run() {
fpid=$!
registertrap ${signal} __LECABASH__kill_running_command__ ${signalto} ${fpid}
killid=$(( $(stacksize "$stackname") - 1 ))
wait
while [ -e /proc/$fpid ]
do
sleep 1
done
logdebug "Remove kill action on $fpid for $signal signal"
eval "${stackname}[${killid}]='sleep 0'"
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment