Hi, On Wed 15 Oct 2008 07:17, "Julian Graham" <[EMAIL PROTECTED]> writes:
> Next up on the list of stupid questions: I was able to compile one of > my modules, but the resulting .go file got created with (what looks > like) a weirdly restrictive umask -- mode 600, and not, say, 664 or > 644. Did I do something wrong? Nope, it's just abuse of POSIX -- we create a temporary file then relink it if the compilation succeeded. Temp files have those perms by default. Patches welcome, to fix this to use the user's umask, to call-with-output-file/atomic in (system base compile). As an aside, it used to be that the file was truncated then rewritten. This was bad. That part of the kernel is notoriously buggy. More relevantly, truncating an mmapped file will cause SIGBUS, which we must avoid. It seems that we are fine with our mmap strategy -- like with ELF files -- but we have to take some care. While I'm rambling, I was looking at the ELF format today, inspired by razor (an *incredibly* fast package manager -- http://github.com/krh/razor/wikis/razor-design), and we really should do more of that style of coding. Specifically regarding ELF, we should be able to dump tagged SCM values into an ELF file, which would help with undumping. And we should be able to write native code to ELF files. But this is all future work. There is lots of exciting stuff to do in this regard. Andy -- http://wingolog.org/
