Targets created from stdout should be rw-, not rwx.

I had forgotten to pass the create mode to open().  Oops!
This commit is contained in:
Avery Pennarun 2010-11-24 02:26:15 -08:00
commit 83dd52c209
6 changed files with 10 additions and 5 deletions

View file

@ -76,7 +76,7 @@ class BuildJob:
return self._after2(1)
state.stamp(dofile)
unlink(tmpname)
ffd = os.open(tmpname, os.O_CREAT|os.O_RDWR|os.O_EXCL)
ffd = os.open(tmpname, os.O_CREAT|os.O_RDWR|os.O_EXCL, 0666)
close_on_exec(ffd, True)
self.f = os.fdopen(ffd, 'w+')
# this will run in the dofile's directory, so use only basenames here

1
t/.gitignore vendored
View file

@ -7,3 +7,4 @@ d
test.args
test2.args
/passfail
mode1

View file

@ -1,4 +1,4 @@
redo example/clean curse/clean deps/clean "space dir/clean"
rm -f c c.c c.c.c c.c.c.b c.c.c.b.b d
rm -f c c.c c.c.c c.c.c.b c.c.c.b.b d mode1
rm -f hello [by]ellow *.o *~ .*~ CC LD passfail

1
t/mode1.do Normal file
View file

@ -0,0 +1 @@
echo hello

5
t/modetest.do Normal file
View file

@ -0,0 +1,5 @@
umask 0022
redo mode1
MODE="$(ls -l mode1 | cut -d' ' -f1)"
[ "$MODE" = "-rw-r--r--" ] || exit 78

View file

@ -1,6 +1,4 @@
redo-ifchange all
./hello >&2
redo deltest deltest2 test.args test2.args passfailtest \
curse/test deps/test "space dir/test"
curse/test deps/test "space dir/test" modetest