On October 7, 2004 22:41, s. keeling wrote: > If it's a well behaving program, you might be able to rely on it > writing its PID to a lockfile, then you'd just have to parse/interpret > its lockfile filename/contents.
i wouldn't recommend that, really, for a variety of reasons, including:
- generally only servers, and then only some of them, write lock files
- not all programs put their PID there
- if the program forks/execs or is multithreaded[1] you won't get an accurate
PID
in other words, this is not a reliable mechanism. just do what pidof does. the
code in busybox is like 100 lines long. =)
[1] unless you are using NTLP and have it set up correctly
--
Aaron J. Seigo
Society is Geometric
pgpHlVTwQlYou.pgp
Description: PGP signature
_______________________________________________ clug-talk mailing list [EMAIL PROTECTED] http://clug.ca/mailman/listinfo/clug-talk_clug.ca Mailing List Guidelines (http://clug.ca/ml_guidelines.php) **Please remove these lines when replying

