[darcs-users] [trivial] darcs dies when hitting EPIPE on stdout
David Roundy
droundy at jdj5.mit.edu
Sun Feb 1 14:58:47 UTC 2004
On Sun, Feb 01, 2004 at 04:17:27PM +0200, Aggelos Economopoulos wrote:
> > Fixed. It isn't particularly clean, but I've got it working at least
> > under ghc 6.2. The problem was that I fixed darcs so it would clean
> > up after itself in case of a sigPIPE signal (rather than leaving
> > temporaries lying around), but since I throw an asynchronous exception
> > in case of sigPIPE, the synchronous exception due to writing to stdout
> > happens first, and I don't know the type of that exception. What I've
> > done is to exit without an error message when there is an IO exception
> > on the file "<stdout>". This is obviously rather ugly, but I can't see
> > how to find out if the error is EPIPE.
>
> Can you at least write a C function to test if stdout is a pipe and
> only then skip the error message?
Ah, that's a good idea. Done.
--
David Roundy
http://www.abridgegame.org
More information about the darcs-users
mailing list