On Tue, Feb 21, 2017 at 3:53 PM, Yann Ylavic <ylavic....@gmail.com> wrote:
> On Tue, Feb 21, 2017 at 3:19 PM, Rainer Canavan
> <rainer.cana...@sevenval.com> wrote:
[...]
>> If you know where the .pid file is, you can read that and check if the
>> process is
>> running, e.g. via ps --pid `cat /var/run/apache2.pid`
>
> Or:
>     kill -0 `cat /var/run/apache2.pid`
>
> which is likely "lighter".

That's probably the preferred way if the user has the proper
permissions, but fails if a non-privileged user attempts to check if a
process running as root is actually running.  I also haven't checked
if ps --pid is POSIX or a GNU extension, but it should at least work
on debian.


rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to