[Haskell-cafe] about openTempFile
Brandon S. Allbery KF8NH
allbery at ece.cmu.edu
Wed Sep 17 14:53:24 EDT 2008
On 2008 Sep 17, at 8:17, Manlio Perillo wrote:
> The Python tempfile module, as an example, implements a wrapper
> around mkstemp function that does exactly this, and the code is
> portable; on Windows it uses O_TEMPORARY_FILE flag, on POSIX systems
> the file is unlink-ed as soon as it is created (but note that the
> code is not signal safe - well, many functions in the Python
> standard library are not signal safe).
> There are reasons why GHC library does not implement this?
POSIX doesn't guaranteed that open-and-unlink works; HP-UX is a
"POSIX" platform on which it doesn't.
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university KF8NH
More information about the Haskell-Cafe