On Tue, Feb 21, 2017 at 3:53 PM, Yann Ylavic <ylavic.dev@xxxxxxxxx> wrote: > On Tue, Feb 21, 2017 at 3:19 PM, Rainer Canavan > <rainer.canavan@xxxxxxxxxxxx> 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-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx