> This isn't exactly urgent but Glasgow Haskell seems to be
> freezing stdin in
> such a way that other applications can't get at it. For
> example, take the following
> well-known program:
> main = putStr "Hello World!"
> If I run this and then run a well-known SML compiler I get:
>
>
> Standard ML of New Jersey v110.7 [FLINT v1.41], June 2, 1998
> [CM; autoload enabled]
> -
> uncaught exception Io: input failed on "<stdIn>", Resource
> temporarily unavailable
> (various other blah omitted).
>
> Also lynx falls over (in an even less informative way). I've
> tried running
> hw on truss but can't figure out what's going on, maybe I
> don't know enough
> about truss. However if I replace the above Haskell program with
> main = return ()
> there is no problem. What is going on please?
We set stdin to non-blocking mode, so that could be the problem ("resource
temporarilty unavailable" is the error you get for trying to read from a
non-blocking file descriptor when there's no input available).
What shell are you using? it sounds like you're using a shell that doesn't
reset the tty back to a sane state.
Cheers,
Simon