aboutsummaryrefslogtreecommitdiff
path: root/lib/xwrap.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/xwrap.c')
-rw-r--r--lib/xwrap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/xwrap.c b/lib/xwrap.c
index 9f1dc996..f5eb4d11 100644
--- a/lib/xwrap.c
+++ b/lib/xwrap.c
@@ -452,7 +452,7 @@ void xpidfile(char *name)
sprintf(pidfile, "/var/run/%s.pid", name);
// Try three times to open the sucker.
for (i=0; i<3; i++) {
- fd = open(pidfile, O_CREAT|O_EXCL, 0644);
+ fd = open(pidfile, O_CREAT|O_EXCL|O_WRONLY, 0644);
if (fd != -1) break;
// If it already existed, read it. Loop for race condition.