sps won't stop running

Eric Halil eric at brolga.cc.uq.oz.au
Mon Mar 18 10:45:06 AEST 1991


Hi,

I have a shell script which needs to see if a process is running and if not
restart it.  I check to see if the process is running using the following
line

  if sps w | grep -v grep | grep "$PROCESS" >/dev/null 2>&1
  then
	  :
  else
	  $PROCESS &
  fi

where $PROCESS contains the process name.

The problem is that occasionally sps doesn't stop running! It just keeps
going and going--I need to kill it to stop it. A sps on the runaway sps 
process shows it's status as RUN. Can anyone explain whats going on??

Thanks,
Eric.
----
Eric Halil                           |Internet/CSnet:         eric at cc.uq.oz.au
Prentice Computer Centre             |Bitnet:    eric%cc.uq.oz.au at uunet.uu.net
University of Queensland    4072     |UUCP:        uunet!munnari!cc.uq.oz!eric
AUSTRALIA --   Phone: +61 7 365 3610 |JANET:        eric%cc.uq.oz.au at uk.ac.ukc



More information about the Comp.unix.questions mailing list