[Haskell-cafe] Re: Re: A ghc-6.10.1 bug or a feature?

Juraj Hercek juhe_haskell at hck.sk
Thu Jan 29 11:37:22 EST 2009


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


More information about the Haskell-Cafe mailing list