mirror of https://github.com/BOINC/boinc.git
start script: create lock and pid files non-world-writeable
This commit is contained in:
parent
e93e436b5a
commit
1274dbe2cb
|
@ -284,7 +284,7 @@ def double_fork():
|
|||
|
||||
# Decouple from parent environment.
|
||||
os.chdir("/")
|
||||
os.umask(0)
|
||||
os.umask(02)
|
||||
os.setsid()
|
||||
|
||||
# Do second fork.
|
||||
|
@ -312,6 +312,7 @@ def is_pid_running(pid):
|
|||
locks = []
|
||||
def lock_file(filename):
|
||||
global locks
|
||||
os.umask(02)
|
||||
file = open(filename,'w')
|
||||
locks.append(file)
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue