summaryrefslogtreecommitdiffstats
path: root/tools/pidfile.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-07-09 09:42:32 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-07-09 09:42:32 +0200
commit3e4aa167eed33a37163446feb2f28efe3e4582d5 (patch)
treeb309d9fe6ab1c33f2e9df8512cf0216e2ce86271 /tools/pidfile.c
parente2c9493b0d832078e181a6bce3373850df27d204 (diff)
parent9f286c0c4c21128c66305166ae379d3f7b07f673 (diff)
downloadrsyslog-3e4aa167eed33a37163446feb2f28efe3e4582d5.tar.gz
rsyslog-3e4aa167eed33a37163446feb2f28efe3e4582d5.tar.xz
rsyslog-3e4aa167eed33a37163446feb2f28efe3e4582d5.zip
Merge branch 'master' into udpspoof
Conflicts: tools/omfwd.c
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;