View Single Post

  #8  
Old 06-30-2008, 06:36 AM
Default Re: How to get an "alert" when a process dies

* nicc777
| Is there a way to trigger an event (like running a script) when a
| process dies? Perhaps even a script to restart a process if it detects
| that it's dead?

#!/bin/sh
while true ; do
run_your_process
status=$?
case $status in
0) : probably ok? ; break ;;
*) echo "process has exited with status $status, re-run"
esac
donex

?

R'
Reply With Quote