> ,---- > | while true; do > | > | IDP=$(pidof your_process) > | > | if (( $? == 1 )) ; then > | echo "End your_process with pid:$IDP" | mail -s "subject text" user > | fi > | > | sleep 1 > | > | done > `---- I tested this, it runs great, but it would send me more than one duplicated emails. Is there a way to break after the first email is sent or something? Thanks, -- Zhengquan