From ea9ccf0da143986b7c626b27a17d51448e6a65c6 Mon Sep 17 00:00:00 2001 From: Benoit Chesneau Date: Mon, 1 Feb 2010 22:21:11 +0100 Subject: [PATCH] create temporary file in target dir --- gunicorn/arbiter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gunicorn/arbiter.py b/gunicorn/arbiter.py index 2ac04e66..0b9739dd 100644 --- a/gunicorn/arbiter.py +++ b/gunicorn/arbiter.py @@ -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)