[MLton] Writing memory to disk ...
Ville Laurikari
ville@laurikari.net
Wed, 24 May 2006 21:43:34 +0300
On Wed, May 24, 2006 at 10:49:47AM -0700, Stephen Weeks wrote:
> * Change the default directory on non-Windows machines to /var/tmp.
> Is there any other platform that should remain as /tmp or be
> something else entirely (AIX, *BSD, Darwin, HP-UX)?
On AIX, HP-UX, and Solaris /var/tmp should be used for large temporary
files. I think I've read some NetBSD manual which said the same
thing; /tmp may be in RAM or on the root partition so it's not good
for very large files.
It's also worth noting that on some systems tmpfile() is implemented
insecurely. I don't know if this is the case on the platforms MLton
supports. To be sure, a better alternative is mkstemp() combined with
a correct umask(). There are numerous articles on the net about how
to securely create temporary files.
--
http://www.iki.fi/vl/