[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [PATCH] Add --cmdpart to filter processes by argv elements.


On Wed, 2014-09-10 at 22:29:10 +0200, Clemens Fruhwirth wrote:
> The user can supplies a list of strings by using --cmdpart multiple
> times, such as
> $ start-stop-daemon --cmdpart /usr/bin/python --cmdpart mydaemon.py ....
> This list is prefix-matched against the argv list of existing
> processes. Only matching processes are considered to be the daemon in
> question. As by the example above, the main intended use case is
> allowing start-stop-daemon to detect running scripts.

Ah! Yes, I started working on a solution for this some time ago, that
instead would be automatic, by reading the executable and detecting
if it's an interpreted script, which would then check the arguments
and match the first one against that.

I think I have the interpreter detection done, just need to plug it
into the rest, but I'd have to look for the code, let me get 1.17.14
out of the way and I'll come back to you with more concrete plans or

> This is only implemented for Linux ATM, making use of
> /proc/pid/cmdline.

I'm afraid that would be a non-starter.


Reply to: