diff options
author | Nick Mathewson <nickm@torproject.org> | 2010-11-20 01:16:29 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2010-11-20 01:16:29 -0500 |
commit | e669d25e43d4c21f11a396c07dc8ed632b406139 (patch) | |
tree | 402e8dcab343ddba8f8c66daa7d197616f402750 /src/common/compat.h | |
parent | 5a66de7015d32e723f13171b622a8dabcef05126 (diff) | |
download | tor-e669d25e43d4c21f11a396c07dc8ed632b406139.tar.gz tor-e669d25e43d4c21f11a396c07dc8ed632b406139.zip |
Do cloexec on socketpairs and stdio files
Diffstat (limited to 'src/common/compat.h')
-rw-r--r-- | src/common/compat.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/common/compat.h b/src/common/compat.h index 9eaf77a1d7..91ad9dec49 100644 --- a/src/common/compat.h +++ b/src/common/compat.h @@ -51,6 +51,8 @@ #include <netinet6/in6.h> #endif +#include <stdio.h> + #if defined (WINCE) #include <fcntl.h> #include <io.h> @@ -340,8 +342,8 @@ struct tm *tor_gmtime_r(const time_t *timep, struct tm *result); ((tvp)->tv_sec cmp (uvp)->tv_sec)) /* ===== File compatibility */ - int tor_open_cloexec(const char *path, int flags, unsigned mode); +FILE *tor_fopen_cloexec(const char *path, const char *mode); int replace_file(const char *from, const char *to); int touch_file(const char *fname); |