On Sat, 18 Feb 2006, Jason Holt wrote:
I imagine you'll want something involving "echo $$ >myscript.pid" and then
perhaps "ps -a | grep `cat myscript.pid` | grep myscript && kill `cat
myscript.pid` && exit"
If you were running a high reliability system, you'd want to do something like
the above; otherwise, if the instance of the script that made the pidfile had
died, you could end up killing some other process that happened to get that
pid the next time around. In some cases you might even have to worry about
some other script also being named "myscript" and getting the same pid.
-J
--------------------
BYU Unix Users Group
http://uug.byu.edu/
The opinions expressed in this message are the responsibility of their
author. They are not endorsed by BYU, the BYU CS Department or BYU-UUG.
___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list