$_VWAIT --timeout "$VSHELPER_SYNC_TIMEOUT" \
--status-fd 3 "$2" \
>>$_is_tmpdir/out 2>$_is_tmpdir/err 3>$_is_tmpdir/fifo
+ rc=$?
- $_VPS axf | $_EGREP -e "^[^ \t]+[ \t]+$S_CONTEXT[ \t]+" >&4
+ if test "$rc" -ne 0 -a "$rc" -ne 1; then
+ $_VPS axf | $_EGREP -e "^[^ \t]+[ \t]+$S_CONTEXT[ \t]+" >&4
+ killContext "$S_CONTEXT" 9
+ fi
- killContext "$S_CONTEXT" 9
+ exit $rc
) 4>$_is_tmpdir/procs &
echo "$!" >$_is_tmpdir/pid
## Usage: _waitForVWait <vserver> <fifo> <pid> <procs>
function _waitForVWait
{
+ wait "$3" || :
+
declare -a status
- declare -r procs=$4
+ declare -r procs=$(cat $4)
- wait "$3" || :
getFileArray status "$2"
set -- ${status[0]}
be killed by sending a SIGKILL signal. The following process list
might be useful for finding out the reason of this behavior:
-$procs
-"
+----------------------------------------------------------------------
+${procs:+$procs
+}----------------------------------------------------------------------"
;;
(\?\?\?|*) warning $"\
local vwait_pid=$4
if test -d "$vwait_statdir"; then
- _waitForVWait "$cfgdir" "$vwait_statdir/fifo" "$( <$vwait_statdir/pid )" "$( < $vwait_statdir/procs )"
+ _waitForVWait "$cfgdir" "$vwait_statdir/fifo" "$( <$vwait_statdir/pid )" "$vwait_statdir/procs"
elif test -n "$_NEED_VSHELPER_SYNC"; then
$_VSHELPER_SYNC "$fifo" "$VSHELPER_SYNC_TIMEOUT" || \
warning $"\