summaryrefslogtreecommitdiffstats
path: root/tools/pidfile.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-04-21 16:54:05 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-04-21 16:54:05 +0200
commit88caccecf8dd8beaf46915df05241a44f7d635f6 (patch)
tree7d6db5808b3bdd2453f041fef5c808b8fab36119 /tools/pidfile.c
parent6e410a76f64d74fec03de27a6ca1f3f996844917 (diff)
parent8e536c5b25ca1a7106f541149cf0d76bdf9237da (diff)
downloadrsyslog-88caccecf8dd8beaf46915df05241a44f7d635f6.tar.gz
rsyslog-88caccecf8dd8beaf46915df05241a44f7d635f6.tar.xz
rsyslog-88caccecf8dd8beaf46915df05241a44f7d635f6.zip
Merge branch 'master' into beta
Conflicts: ChangeLog configure.ac doc/manual.html
Diffstat (limited to 'tools/pidfile.c')
-rw-r--r--tools/pidfile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/pidfile.c b/tools/pidfile.c
index 2be13da6..e7744513 100644
--- a/tools/pidfile.c
+++ b/tools/pidfile.c
@@ -97,7 +97,7 @@ int write_pid (char *pidfile)
int fd;
int pid;
- if ( ((fd = open(pidfile, O_RDWR|O_CREAT, 0644)) == -1)
+ if ( ((fd = open(pidfile, O_RDWR|O_CREAT|O_CLOEXEC, 0644)) == -1)
|| ((f = fdopen(fd, "r+")) == NULL) ) {
fprintf(stderr, "Can't open or create %s.\n", pidfile);
return 0;