mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
create temporary file in target dir
This commit is contained in:
parent
c920d59332
commit
ea9ccf0da1
@ -76,7 +76,7 @@ class Arbiter(object):
|
||||
self.unlink_pidfile(self.pidfile)
|
||||
|
||||
# write pidfile
|
||||
fd, fname = tempfile.mkstemp()
|
||||
fd, fname = tempfile.mkstemp(dir=os.path.dirname(path))
|
||||
os.write(fd, "%s\n" % self.pid)
|
||||
os.rename(fname, path)
|
||||
os.close(fd)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user