[darcs-users] problem with --sendmail-command
dagit at codersbase.com
Tue Oct 7 16:40:49 UTC 2008
On Tue, Oct 7, 2008 at 4:36 AM, Benjamin Franksen <
benjamin.franksen at bessy.de> wrote:
> Yes, this is ok, I was just confused. What is not ok is that execSendmail
> gets called /outside/ the body of the withOpenTemp that creates the
> attached file. That is, the file gets deleted before the sendmail command
> is called. I have a patch that should fix this, which I will send later
> today (after some testing). This bug, BTW, nicely illustrates a weakness of
> the withXYZ idiom: it cannot statically prevent that some resource
> allocated (in this case the name of the tempfile) 'escapes' the body, i.e.
> its scope of validity. I strongly support the idea to investigate whether
> parts of the darcs code can be refactored to use Oleg's latest enumerator
> stuff, as suggested recently on this list.
I don't have this code handy, but could we also use universal quantification
on the XYZ's type to prevent it from escaping like with the ST monad? Just
a thought, not sure if it makes sense here.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the darcs-users