daemon: make pidfile world-readable (closes #75968)

There's no reason to hide this behind restrictive permissions, and making it world-readable allows non-root monitoring of the daemon. See https://www.cubicweb.org/ticket/1910818

authorJulien Cristau <julien.cristau@logilab.fr>
changeset4a2341d043aa
branchstable
phasepublic
hiddenno
parent revision#ac9d778b6a76 in some cases we want to specify wrapped object name/documentation so it's not fetched from it
child revision#8578bf486667 pkginfo: only install unittest2 when python version < 2.7 (closes: #76068)
files modified by this revision
daemon.py
# HG changeset patch
# User Julien Cristau <julien.cristau@logilab.fr>
# Date 1316097512 -7200
# Thu Sep 15 16:38:32 2011 +0200
# Branch stable
# Node ID 4a2341d043aafe87edc8a09db430f850ee8bc2a1
# Parent ac9d778b6a769261ae008c88e676256c0c96575d
daemon: make pidfile world-readable (closes #75968)

There's no reason to hide this behind restrictive permissions, and
making it world-readable allows non-root monitoring of the daemon.
See https://www.cubicweb.org/ticket/1910818

diff --git a/daemon.py b/daemon.py
@@ -90,10 +90,11 @@
1          if not os.path.exists(piddir):
2              os.makedirs(piddir)
3          f = file(pidfile, 'w')
4          f.write(str(os.getpid()))
5          f.close()
6 +        os.chmod(pidfile, 0644)
7      # change process uid
8      if uid:
9          setugid(uid)
10      return None
11