Duncan Coutts wrote:
On Wed, 2009-01-28 at 16:56 +0100, Juraj Hercek wrote:
Prelude> a <- readFile "/sys/devices/system/cpu/online"
Prelude> length a `seq` a
"^CInterrupted.

http://hackage.haskell.org/trac/ghc/ticket/2971

Files in /proc and /sys are not select()able which messes up ghc's IO
system. It's not entirely clear what changed between 6.8 and 6.10 that
means we hit this now. (I'd have expected it never to have worked given
that ghc has always used non-blocking IO.
Interesting. It looks like it works when I use non-lazy interface for file reading (withFile "/sys/devices/system/cpu/online" ReadMode hGetLine). Does this non-lazy interface use select too? In other words, is it only a good luck that it works?

-- Juraj
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to