ceph/src/ceph-run

22 lines
292 B
Plaintext
Raw Normal View History

2008-10-03 19:06:28 +00:00
#!/bin/sh
sleep=5
2009-01-29 23:01:25 +00:00
2008-10-03 19:06:28 +00:00
while [ true ]; do
2009-03-23 22:22:46 +00:00
"$@"
exit_code=$?
if [ $exit_code -gt 128 ]; then
case $(($exit_code-128)) in
3 | 4 | 5 | 6 | 8 | 11)
;;
*)
exit;
esac
echo crun: $1 dumped core, restarting in $sleep seconds...
sleep $sleep
else
exit
fi
2008-10-03 19:06:28 +00:00
done