Jedy Wang wrote: > Hi Phi, > > On my system, 'pgrep -f gnome-power-manager' returns the pid of > gnome-power-manager.
Yes, that works, but it will also pick up the pid of someone doing "vi gnome-power-manager.dbg" :) Phi > > Regards, > > Jedy > On Wed, 2009-03-11 at 22:47 -0700, Phi Tran wrote: >> "pgrep gnome-power-manager" doesn't work so I searched using "pgrep -f >> -P 1 gnome-power-manager". Without the -f option, pgrep compares to >> the >> execuatable name in psinfo, but psinfo doesn't have the entire name, >> just "gnome-power-man". I thought matching to the init PPID was more >> unique than "pgrep gnome-power-man" since another executable could >> possibly start with that string. It's probably unlikely that another >> executable will start with "gnome-power-man" so maybe that >> is a good enough fix. >> >> Phi >> >