revert: unix.c (tempfile_open): Pass mode to "open" for O_CREAT.

2012-05-31  Tobias Burnus  <burnus@net-b.de>

        Revert:
        2012-05-16  Tobias Burnus  <burnus@net-b.de>

        * io/unix.c (tempfile_open): Pass mode to "open" for O_CREAT.

From-SVN: r188048
This commit is contained in:
Tobias Burnus 2012-05-31 08:10:18 +02:00 committed by Tobias Burnus
parent 7cc61ee413
commit 9daf64e704
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2012-05-31 Tobias Burnus <burnus@net-b.de>
Revert:
2012-05-16 Tobias Burnus <burnus@net-b.de>
* io/unix.c (tempfile_open): Pass mode to "open" for O_CREAT.
2012-05-30 Tobias Burnus <burnus@net-b.de> 2012-05-30 Tobias Burnus <burnus@net-b.de>
* io/io.h: Fix comment typos. * io/io.h: Fix comment typos.

View File

@ -1099,9 +1099,9 @@ tempfile_open (const char *tempdir, char **fname)
#if defined(HAVE_CRLF) && defined(O_BINARY) #if defined(HAVE_CRLF) && defined(O_BINARY)
fd = open (template, O_RDWR | O_CREAT | O_EXCL | O_BINARY, fd = open (template, O_RDWR | O_CREAT | O_EXCL | O_BINARY,
S_IRUSR | S_IWUSR, 0600); S_IRUSR | S_IWUSR);
#else #else
fd = open (template, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR, 0600); fd = open (template, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
#endif #endif
} }
while (fd == -1 && errno == EEXIST); while (fd == -1 && errno == EEXIST);