diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-04-03 12:52:53 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-04-03 12:52:53 +0200 |
commit | 1a08fa5ded3087a3b60d87a20d25a4ec589eba21 (patch) | |
tree | 9dd51c4b9db468be41a63f4286029d95bef0bf0b /tools/pidfile.c | |
parent | 5f397495524ffe460fe93d2f1069f3077f48b7b0 (diff) | |
parent | ec0e2c3e7df6addc02431628daddfeae49b92af7 (diff) | |
download | rsyslog-1a08fa5ded3087a3b60d87a20d25a4ec589eba21.tar.gz rsyslog-1a08fa5ded3087a3b60d87a20d25a4ec589eba21.tar.xz rsyslog-1a08fa5ded3087a3b60d87a20d25a4ec589eba21.zip |
Merge branch 'master' into oracle
Diffstat (limited to 'tools/pidfile.c')
-rw-r--r-- | tools/pidfile.c | 2 |
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; |