Skip to content

Commit

Permalink
s!
Browse files Browse the repository at this point in the history
Signed-off-by: наб <[email protected]>
  • Loading branch information
nabijaczleweli committed Mar 31, 2021
1 parent 75d44cc commit 0212c14
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions tests/zfs-tests/include/libtest.shlib
Original file line number Diff line number Diff line change
Expand Up @@ -3705,7 +3705,7 @@ function zed_start
# run ZED in the background and redirect foreground logging
# output to $ZED_LOG.
log_must truncate -s 0 $ZED_DEBUG_LOG
log_must eval "zed -vF -d $ZEDLET_DIR -p $ZEDLET_DIR/zed.pid -P $PATH" \
log_must eval "zed -vF -d $ZEDLET_DIR -P $PATH" \
"-s $ZEDLET_DIR/state -j 1 2>$ZED_LOG &"
fi

Expand All @@ -3722,14 +3722,13 @@ function zed_stop
fi

log_note "Stopping ZED"
if [[ -f ${ZEDLET_DIR}/zed.pid ]]; then
zedpid=$(<${ZEDLET_DIR}/zed.pid)
kill $zedpid
while ps -p $zedpid > /dev/null; do
sleep 1
done
rm -f ${ZEDLET_DIR}/zed.pid
fi
while true; do
zedpids="$(pgrep -x zed)"
[ "$?" -ne 0 ] && break

log_must kill $zedpids
sleep 1
done
return 0
}

Expand Down

0 comments on commit 0212c14

Please sign in to comment.