diff options
author | Bram Moolenaar <Bram@vim.org> | 2009-11-17 16:13:15 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2009-11-17 16:13:15 +0000 |
commit | f05da21900ee28e679a69439fd1c2ec94367e1d7 (patch) | |
tree | 94fa61ec2def86333b84eaa7bae85115f8373620 /src/memfile.c | |
parent | 2d7ff056e13e66c135c67935f32e15a26b8dfd80 (diff) | |
download | vim-f05da21900ee28e679a69439fd1c2ec94367e1d7.zip |
updated for version 7.2-300
Diffstat (limited to 'src/memfile.c')
-rw-r--r-- | src/memfile.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/memfile.c b/src/memfile.c index 0b3cdd9be..bd03e65a6 100644 --- a/src/memfile.c +++ b/src/memfile.c @@ -1343,6 +1343,11 @@ mf_do_open(mfp, fname, flags) } else { +#ifdef HAVE_FD_CLOEXEC + int fdflags = fcntl(mfp->mf_fd, F_GETFD); + if (fdflags >= 0 && (fdflags & FD_CLOEXEC) == 0) + fcntl(mfp->mf_fd, F_SETFD, fdflags | FD_CLOEXEC); +#endif #ifdef HAVE_SELINUX mch_copy_sec(fname, mfp->mf_fname); #endif |