summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2009-02-24 23:02:33 +0100
committerAndy Wingo <wingo@pobox.com>2009-02-24 23:02:33 +0100
commita56db0f67edb093cc3611dede2c49d1fb4a88a5e (patch)
tree39fec5c1564f0134f19ea7aeb6749a4aa2af3c1d
parentcb4362cdaed0ce5f77e8881a9172b26401daecc2 (diff)
downloadguile-a56db0f67edb093cc3611dede2c49d1fb4a88a5e.tar.gz
use umask when making permissions on .go files
* module/system/base/compile.scm (call-with-output-file/atomic): Temp files get created 0600. After we're done writing, chmod them to something in line with the user's umask.
-rw-r--r--module/system/base/compile.scm1
1 files changed, 1 insertions, 0 deletions
diff --git a/module/system/base/compile.scm b/module/system/base/compile.scm
index 86e398ecc..e54b4ac05 100644
--- a/module/system/base/compile.scm
+++ b/module/system/base/compile.scm
@@ -78,6 +78,7 @@
(with-throw-handler #t
(lambda ()
(proc tmp)
+ (chmod tmp (logand #o0666 (lognot (umask))))
(close-port tmp)
(rename-file template filename))
(lambda args