echo " -h|--help: this usage help."
echo " -t|--timeout <value>: timeout for operation in seconds."
echo " Defaults to $TIMEOUT__dflt seconds if not provided."
- echo " -f|--file <file>: file with one operation per line."
+ echo " -f|--file <file>: file with one operation per line (comments # allowed)."
echo " -p|--ping: Check the target process id."
echo " Returns 1 (dead) or 0 (alive)."
echo " operation: quoted operation string. Will be ignored if file"
kill -s SIGUSR2 $PID
# Detect EOF and print all except that last line:
-count=$((10*timeout))
+count=$((10*timeout))
expired=yes
-while [ $count -gt 0 ]
-do
- sleep 0.1
- count=$((count-1))
+while [ $count -gt 0 ]
+do
+ sleep 0.1
+ count=$((count-1))
if tail -1 sigusr2.out | grep "^EOF" >/dev/null; then
expired=
break;
fi
-done
+done
if [ -z "$expired" ]
then