Comment 9 for bug 246735

Revision history for this message
Matt Zimmerman (mdz) wrote : Re: [Bug 246735] Re: status_of_proc() calls pidofproc() which calls kill, requiring ownership privileges on the process

On Wed, Jul 09, 2008 at 07:10:03PM -0000, Dustin Kirkland wrote:
> Steve recommends *not* returning 100 in the case where the euid doesn't
> own the process.
>
> pidofproc is not documented as returning non-zero in the case you don't
> own the process. In fact, if no pid file is found, and /bin/pidof runs
> farther down, it doesn't check ownership either.
>
> This patch returns 0 if the ps finds a process with a matching pid.
>
> Comments?

Sounds sane to me.

I think it would be fine to remove the kill(1) bits entirely, but am not
bothered if you want to leave it in either.

--
 - mdz