[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] [tor/master 7/9] Open log files with CLOEXEC flag set
Author: Steven Murdoch <Steven.Murdoch@xxxxxxxxxxxx>
Date: Wed, 1 Dec 2010 15:38:18 +0000
Subject: Open log files with CLOEXEC flag set
Commit: 786abbd54c77d4d39488e27ddde0b26ee5c9478f
---
src/common/log.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/common/log.c b/src/common/log.c
index e507275..6f86406 100644
--- a/src/common/log.c
+++ b/src/common/log.c
@@ -686,7 +686,7 @@ add_file_log(const log_severity_list_t *severity, const char *filename)
int fd;
logfile_t *lf;
- fd = open(filename, O_WRONLY|O_CREAT|O_APPEND, 0644);
+ fd = tor_open_cloexec(filename, O_WRONLY|O_CREAT|O_APPEND, 0644);
if (fd<0)
return -1;
if (tor_fd_seekend(fd)<0)
--
1.7.1