ceph/src/crun

38 lines
492 B
Plaintext
Raw Normal View History

2008-10-03 19:06:28 +00:00
#!/bin/sh
2008-11-03 20:35:40 +00:00
daemon=0
valgrind=""
# explicit -n/--norestart?
while [ $# -ge 1 ]; do
case $1 in
-n | --norestart )
daemon=1
shift
;;
--valgrind )
valgrind="valgrind"
daemon=1
shift
;;
* )
break
esac
done
orig_args=$*
# implicit from any -d?
while [ $# -ge 1 ]; do
case $1 in
-d | --daemon )
daemon=1
esac
shift
done
2008-10-03 19:06:28 +00:00
while [ true ]; do
$valgrind $orig_args
[ $daemon -eq 1 ] && exit
2008-10-03 19:06:28 +00:00
done