llvm.org GIT mirror llvm / 67f9b37
Create files with mode 666. This matches the behavior of other unix tools. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186414 91177308-0d34-0410-b5e6-96231b3b80d8 Rafael Espindola 6 years ago
2 changed file(s) with 14 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
460460 if (Flags & F_Excl)
461461 OpenFlags |= O_EXCL;
462462
463 while ((FD = open(Filename, OpenFlags, 0664)) < 0) {
463 while ((FD = open(Filename, OpenFlags, 0666)) < 0) {
464464 if (errno != EINTR) {
465465 ErrorInfo = "Error opening output file '" + std::string(Filename) + "'";
466466 ShouldClose = false;
0 ; REQUIRES: shell
1
2 ; RUN: umask 000
3 ; RUN: rm -f %t.000
4 ; RUN: llvm-as %s -o %t.000
5 ; RUN: ls -l %t.000 | FileCheck --check-prefix=CHECK000 %s
6 ; CHECK000: rw-rw-rw
7
8 ; RUN: umask 002
9 ; RUN: rm -f %t.002
10 ; RUN: llvm-as %s -o %t.002
11 ; RUN: ls -l %t.002 | FileCheck --check-prefix=CHECK002 %s
12 ; CHECK002: rw-rw-r-