Subject: | Allow all users to test the status of the daemon |
Date: | Wed, 31 Jul 2013 19:47:52 +0200 |
To: | bug-Daemon-Control [...] rt.cpan.org |
From: | "jul.gil [...] gmail.com" <jul.gil [...] gmail.com> |
kill 0 $pid is mainly used to test if the process is running. However
only the user running the daemon is able to do a kill 0. So all other
users have "[Not Running]", although the daemon is running.
It could be very useful to allow others to have a correct answer.
As 'kill 0' just tests if a process is running with this pid, an other
solution could be to test for a "/proc/$pid" directory. As proc is
readable by everybody, the 'status' command could then be used by
everybody.
Regards,
--
Julien Gilles.