[arch-projects] [PATCH] get PID of shell scripts
Andrwe
archlinux at andrwe.org
Sun Oct 2 09:37:18 EDT 2011
Hi,
I just noticed that this patch will break the command rc.d because it
will always return the pid of the rc.d command.
So please don't apply it.
Kind regards,
Andrwe
Am 28.08.2011 23:34, schrieb Andrwe:
> 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
>> <archlinux at andrwe.org> 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
More information about the arch-projects
mailing list