[MLton] MLton.TextIO.mkstemps
Matthew Fluet
fluet at cs.cornell.edu
Fri Dec 1 14:05:03 PST 2006
> The bad news: This still doesn't explain my original posting, where the
> contention was on '/tmp/file6snPhX.15.c'. The .c files that arise during a
> compilation are only opened for reading by gcc. Now, mlton does open the .c
> file for writing twice: once via open with O_WRONLY | O_CREAT | O_EXCL to
> grab the filename and then once via open with O_WRONLY | O_CREAT | O_TRUNC to
> write the contents, but we never unlink it until after the call to the linker
> returns and we're cleaning up all intermediate files.
BTW, the Apple file system is case-insensitive (but case-preserving). I
can't extrapolate from that to an explaination, since open with O_WRONLY |
O_CREAT | O_EXCL properly returns "file exists" when called with a file
name that differs only in case to an existing file. But, I thought I
would pass it along.
More information about the MLton
mailing list