[Haskell-cafe] Re: about openTempFile
Brandon S. Allbery KF8NH
allbery at ece.cmu.edu
Wed Sep 17 19:05:37 EDT 2008
On 2008 Sep 17, at 18:20, Aaron Denney wrote:
> On 2008-09-17, Brandon S. Allbery KF8NH <allbery at ece.cmu.edu> wrote:
>> 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.
> Did HPUX's behavior change at some point? This is a standard idiom,
> and I don't remember having any trouble with it, but I haven't used
> anything earlier than 9. The manpages for 11 only document being a
> mount point as cause for EBUSY.
It may have but I recall it being cited as an issue with HP/UX 9 and 10.
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