[Gllug] Getting PIDs
Brent Geach
brent at telecom1.com
Tue Aug 13 11:45:28 UTC 2002
Hi all,
I was wondering if anyone knew of a nice way to get the PID of the parent of a
process. Im writing startup scripts for a load of java apps that will spawn a
load of children when run.
What Im using at the moment is which is a bit of an ugly hack.
pid=`ps auxwww |grep demo |grep -v initlog |grep -v bash | head -1 |awk
'{print$2}'`
echo
[ $RETVAL -eq 0 ] && shlock -p $pid -f /opt/dc/etc/dc.lock
;;
Brent
--
Gllug mailing list - Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug
More information about the GLLUG
mailing list