Commit 95796c1f by Andreas Tobler

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
parent ae246f7f
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> 2013-12-16 Jerry DeLisle <jvdelisle@gcc.gnu>
PR libfortran/59419 PR libfortran/59419
......
...@@ -1124,7 +1124,7 @@ tempfile_open (const char *tempdir, char **fname) ...@@ -1124,7 +1124,7 @@ tempfile_open (const char *tempdir, char **fname)
#endif #endif
#if defined(HAVE_MKOSTEMP) && defined(O_CLOEXEC) #if defined(HAVE_MKOSTEMP) && defined(O_CLOEXEC)
fd = mkostemp (template, O_RDWR | O_CREAT | O_EXCL | O_CLOEXEC); fd = mkostemp (template, O_CLOEXEC);
#else #else
fd = mkstemp (template); fd = mkstemp (template);
set_close_on_exec (fd); set_close_on_exec (fd);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment