]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
unix.c (tempfile_open): Only use the needed flag O_CLOEXEC.
authorAndreas Tobler <andreast@gcc.gnu.org>
Tue, 17 Dec 2013 18:12:39 +0000 (19:12 +0100)
committerAndreas Tobler <andreast@gcc.gnu.org>
Tue, 17 Dec 2013 18:12:39 +0000 (19:12 +0100)
2013-12-17  Andreas Tobler  <andreast@gcc.gnu.org>

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

From-SVN: r206064

libgfortran/ChangeLog
libgfortran/io/unix.c

index 1c6c4da40fdca57e04b9d2048dd5f82be012314e..309712c012bc92b1ca3a0990b2642aa42c6ca8fb 100644 (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
index c2bc28aed15771e22bb20d0b0553f842ef4b59f9..86f7fd6d732e4b14b05ed96cff55f72306b0023e 100644 (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);