|
|
@ -117,9 +117,9 @@ call_func_timeout()
|
|
|
|
( ${func} ) & pid=$!
|
|
|
|
( ${func} ) & pid=$!
|
|
|
|
( sleep ${timeout} && kill -HUP ${pid} ) 2>/dev/null & watcher=$!
|
|
|
|
( sleep ${timeout} && kill -HUP ${pid} ) 2>/dev/null & watcher=$!
|
|
|
|
if wait ${pid} 2>/dev/null; then
|
|
|
|
if wait ${pid} 2>/dev/null; then
|
|
|
|
kill -HUP $watcher 2> /dev/null
|
|
|
|
kill -HUP $watcher 2> /dev/null
|
|
|
|
wait $watcher 2>/dev/null
|
|
|
|
wait $watcher 2>/dev/null
|
|
|
|
return 1
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
return 0
|
|
|
|
return 0
|
|
|
|