#!/bin/sh
#
# Probe script example for GridSolve batch system.
#
# Arguments:  GridSolve will pass one argument to the probe
# script, which is the identifier of the job to probe.
#
# GridSolve probe scripts should exit with the appropriate
# status as follows:
#
#   0 - the job is still running
#   1 - the job has completed
#   2 - the job terminated abnormally 
#
# In this dummy case, we aren't sure about abnormal termination
# so we just return 0 or 1.
#

if kill -0 $1 >& /dev/null; then
  exit 0
else
  exit 1
fi
