unix.c (tempfile_open): Only use the needed flag O_CLOEXEC.

2013-12-17  Andreas Tobler  <andreast@gcc.gnu.org>

    * io/unix.c (tempfile_open): Only use the needed flag O_CLOEXEC.

From-SVN: r206064
This commit is contained in:
Andreas Tobler 2013-12-17 19:12:39 +01:00
parent ae246f7f1d
commit 95796c1fa5
2 changed files with 5 additions and 1 deletions

View file

@ -1,3 +1,7 @@
2013-12-17 Andreas Tobler <andreast@gcc.gnu.org>
* io/unix.c (tempfile_open): Only use the needed flag O_CLOEXEC.
2013-12-16 Jerry DeLisle <jvdelisle@gcc.gnu>
PR libfortran/59419

View file

@ -1124,7 +1124,7 @@ tempfile_open (const char *tempdir, char **fname)
#endif
#if defined(HAVE_MKOSTEMP) && defined(O_CLOEXEC)
fd = mkostemp (template, O_RDWR | O_CREAT | O_EXCL | O_CLOEXEC);
fd = mkostemp (template, O_CLOEXEC);
#else
fd = mkstemp (template);
set_close_on_exec (fd);