> I think I found the most simple version to reproduce this bug.
>
> > module Main where
> > import Posix
> > import IO
> > main = do
> > _ <- installHandler sigUSR1 (Catch (return ())) Nothing
> -- will fail
> > -- _ <- installHandler sigUSR1 Ignore Nothing -- will work
> > loop
> > loop = do
> > putStr "> "
> > msg <- getLine
> > print msg
> > loop
Thanks; there is indeed a bug in the I/O library. In one place we weren't
looping correctly when read() returned EINTR. Patch below...
Cheers,
Simon
*** ghc/lib/std/cbits/fileObject.c 2000/04/14 16:26:53 1.10
--- ghc/lib/std/cbits/fileObject.c 2000/10/10 09:28:50 1.11
***************
*** 131,137 ****
len = fo->bufSize - fo->bufWPtr;
p = (unsigned char*)fo->buf + fo->bufWPtr;
! if ((count =
(
#ifdef USE_WINSOCK
fo->flags & FILEOBJ_WINSOCK ?
--- 131,137 ----
len = fo->bufSize - fo->bufWPtr;
p = (unsigned char*)fo->buf + fo->bufWPtr;
! while ((count =
(
#ifdef USE_WINSOCK
fo->flags & FILEOBJ_WINSOCK ?
_______________________________________________
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs