This modification just uses the parameter -x of pidof.
It just adds the possibility to look for a script name:

"Scripts too - this causes the program to also return process id's of shells running the named scripts." (manpage pidof(8))

So there won't be a break of current uses of this function.
I've also done some tests and the results are always the same wether you use -x for getting pid of normal programs or not.

A usecase is a script I've written which runs as daemon and which I wanted to start using an initscript. Because it expands the functionality without loosing some I think it's worth adding.


Kind regards,
Amdrwe

On Sun, 28 Aug 2011 20:22:01 +0200, Tom Gundersen wrote:
On Sun, Aug 28, 2011 at 7:40 PM, Andrwe Lord Weber
<[email protected]> wrote:
get_pid() can now get the PID of a running shell script which is given as parameter.

Could you add a few words why we want this, preferably with a usecase, and also argue why this will not break any current users of get_pid()?

Cheers,

Tom

Reply via email to