diff options
| author | Russell Belfer <rb@github.com> | 2013-06-22 20:58:32 -0700 |
|---|---|---|
| committer | Russell Belfer <rb@github.com> | 2013-06-22 20:58:32 -0700 |
| commit | 3d3ea4dc564922a3662298a7cfc2fc8b24149901 (patch) | |
| tree | fdfc6507cad967fa809d0596f9ef097c0a74c22f /src/posix.c | |
| parent | 9f1b2c5cb79526f274c0c72eed56f9da0efb0321 (diff) | |
| download | libgit2-3d3ea4dc564922a3662298a7cfc2fc8b24149901.tar.gz | |
Add O_CLOEXEC to open calls
Diffstat (limited to 'src/posix.c')
| -rw-r--r-- | src/posix.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/posix.c b/src/posix.c index 5d526d33c..b75109b83 100644 --- a/src/posix.c +++ b/src/posix.c @@ -111,12 +111,12 @@ int p_open(const char *path, int flags, ...) va_end(arg_list); } - return open(path, flags | O_BINARY, mode); + return open(path, flags | O_BINARY | O_CLOEXEC, mode); } int p_creat(const char *path, mode_t mode) { - return open(path, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, mode); + return open(path, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY | O_CLOEXEC, mode); } int p_getcwd(char *buffer_out, size_t size) |
