Skip to content

Commit

Permalink
Comment default file mode
Browse files Browse the repository at this point in the history
  • Loading branch information
micahjsmith committed May 25, 2016
1 parent 84b7aed commit a29e84b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/support/ios.c
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,10 @@ ios_t *ios_file(ios_t *s, const char *fname, int rd, int wr, int create, int tru
fd = _wopen(fname_w, flags | O_BINARY | O_NOINHERIT, _S_IREAD | _S_IWRITE);
set_io_wait_begin(0);
#else
fd = open_cloexec(fname, flags, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH /* 0666 */);
// The mode of the created file is (mode & ~umask), which resolves with
// default umask to u=rw,g=r,o=r
fd = open_cloexec(fname, flags,
S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
#endif
s = ios_fd(s, fd, 1, 1);
if (fd == -1)
Expand Down

0 comments on commit a29e84b

Please sign in to comment.