summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Cristau <julien.cristau@logilab.fr>2011-09-15 16:38:32 +0200
committerJulien Cristau <julien.cristau@logilab.fr>2011-09-15 16:38:32 +0200
commite2296cde391e5c7cba024ecd07ccd303602cf49f (patch)
tree8db387c78d5db59060017683320bbb4f94577050
parent029e210a24df341202bba7848360e22eecc8a4d3 (diff)
downloadlogilab-common-e2296cde391e5c7cba024ecd07ccd303602cf49f.tar.gz
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
-rw-r--r--daemon.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/daemon.py b/daemon.py
index 2eedca5..b945f8d 100644
--- a/daemon.py
+++ b/daemon.py
@@ -92,6 +92,7 @@ def daemonize(pidfile=None, uid=None, umask=077):
f = file(pidfile, 'w')
f.write(str(os.getpid()))
f.close()
+ os.chmod(pidfile, 0644)
# change process uid
if uid:
setugid(uid)