[darcs-users] darcs patch: Fix hang after a user input error (for example, EOF).

Eric Kow kowey at darcs.net
Sun Sep 21 21:21:15 UTC 2008


Just contributing to the review

On Thu, Sep 18, 2008 at 09:44:15 -0700, Judah Jacobson wrote:
> The attached patch fixes a small issue I found in the non-haskeline
> user input code.  Namely, if darcs prompts for user input and the user
> types ctrl-D, darcs will hang until ctrl-C is pressed.  For example:

This patch seems ok to me.  Instead of storing 'a' in the MVar, we store
Either exception a, re-throwing said execption if we get a Left.

As promised in the original comment, withThread is only used in prompts.
I guess this means if you forkIO (throw foo), your application will hang
until you hit Ctrl-C

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20080921/48d3716f/attachment-0001.pgp 


More information about the darcs-users mailing list