[darcs-devel] [darcs #183] Implement withDelayedTempDir

Tomasz Zielonka tomasz.zielonka at gmail.com
Thu Jan 20 13:13:50 PST 2005


On Thu, Jan 20, 2005 at 03:31:54PM -0500, Juliusz Chroboczek via RT wrote:
> surely_slurp_Current currently uses withPermDir, which means that it
> leaves a lot of trash in /tmp.  Somebody who understands ghc
> finalisers needs to implement withDelayedTempDir that does a
> withPermDir but puts a finaliser somewhere sensible so that the
> directory gets deleted when Darcs quits.

AFAIK, finalizers are not guaranteed to be run at all. There are some profound
reasons for this, but I didn't bother to learn them. Anyway, in this case we
could simply register all directories created with withTempDir somewhere (in a
mutable variable), and then *explicitly* remove all registered directories at
exit.

Best regards,
Tomasz




More information about the darcs-devel mailing list