Fix #2363: getChar cannot be interrupted with -threaded Now in -threaded mode, instead of just making a blocking call to read(), we call select() first to make sure the read() won't block, and if it would block, then we use threadWaitRead.
Fix #2363: getChar cannot be interrupted with -threaded
Now in -threaded mode, instead of just making a blocking call to
read(), we call select() first to make sure the read() won't block,
and if it would block, then we use threadWaitRead.

The idea is that the current thread must be interruptible while it
blocks.  This is a little slower than before, but the overhead only
applies to blocking Handles (stdin/stdout/stderr, and those created by
System.Process).

bitemyapp/ghc,snoyberg/ghc,vikraman/ghc,anton-dessiatov/ghc,mettekou/ghc,vikraman/ghc,nathyong/microghc-ghc,mettekou/ghc,lukexi/ghc,sdiehl/ghc,mcschroeder/ghc,forked-upstream-packages-for-ghcjs/ghc,mettekou/ghc,sdiehl/ghc,siddhanathan/ghc,snoyberg/ghc,mcschroeder/ghc,holzensp/ghc,wxwxwwxxx/ghc,elieux/ghc,christiaanb/ghc,nushio3/ghc,gridaphobe/ghc,mcschroeder/ghc,acowley/ghc,mettekou/ghc,snoyberg/ghc,ghc-android/ghc,nathyong/microghc-ghc,sgillespie/ghc,tjakway/ghcjvm,nushio3/ghc,da-x/ghc,tibbe/ghc,spacekitteh/smcghc,ryantm/ghc,ryantm/ghc,urbanslug/ghc,lukexi/ghc,nkaretnikov/ghc,TomMD/ghc,forked-upstream-packages-for-ghcjs/ghc,frantisekfarka/ghc-dsi,mettekou/ghc,mfine/ghc,vTurbine/ghc,oldmanmike/ghc,AlexanderPankiv/ghc,ryantm/ghc,frantisekfarka/ghc-dsi,oldmanmike/ghc,tibbe/ghc,gcampax/ghc,vikraman/ghc,sdiehl/ghc,elieux/ghc,oldmanmike/ghc,mfine/ghc,christiaanb/ghc,green-haskell/ghc,ml9951/ghc,siddhanathan/ghc,vTurbine/ghc,shlevy/ghc,mfine/ghc,fmthoma/ghc,jstolarek/ghc,frantisekfarka/ghc-dsi,vTurbine/ghc,ml9951/ghc,da-x/ghc,ml9951/ghc,mfine/ghc,mcschroeder/ghc,ryantm/ghc,christiaanb/ghc,frantisekfarka/ghc-dsi,ml9951/ghc,shlevy/ghc,sgillespie/ghc,shlevy/ghc,olsner/ghc,nkaretnikov/ghc,holzensp/ghc,mfine/ghc,nkaretnikov/ghc,ezyang/ghc,forked-upstream-packages-for-ghcjs/ghc,olsner/ghc,acowley/ghc,shlevy/ghc,acowley/ghc,shlevy/ghc,tibbe/ghc,nathyong/microghc-ghc,green-haskell/ghc,green-haskell/ghc,sdiehl/ghc,gcampax/ghc,urbanslug/ghc,forked-upstream-packages-for-ghcjs/ghc,spacekitteh/smcghc,tjakway/ghcjvm,AlexanderPankiv/ghc,gridaphobe/ghc,gcampax/ghc,frantisekfarka/ghc-dsi,tjakway/ghcjvm,ghc-android/ghc,gcampax/ghc,sgillespie/ghc,ezyang/ghc,vTurbine/ghc,gridaphobe/ghc,ezyang/ghc,vikraman/ghc,ezyang/ghc,vTurbine/ghc,wxwxwwxxx/ghc,christiaanb/ghc,ml9951/ghc,nathyong/microghc-ghc,anton-dessiatov/ghc,nushio3/ghc,gridaphobe/ghc,wxwxwwxxx/ghc,vTurbine/ghc,acowley/ghc,nkaretnikov/ghc,TomMD/ghc,anton-dessiatov/ghc,forked-upstream-packages-for-ghcjs/ghc,tjakway/ghcjvm,urbanslug/ghc,lukexi/ghc,AlexanderPankiv/ghc,oldmanmike/ghc,elieux/ghc,anton-dessiatov/ghc,siddhanathan/ghc,fmthoma/ghc,anton-dessiatov/ghc,TomMD/ghc,nushio3/ghc,olsner/ghc,acowley/ghc,forked-upstream-packages-for-ghcjs/ghc,holzensp/ghc,sgillespie/ghc,nathyong/microghc-ghc,GaloisInc/halvm-ghc,oldmanmike/ghc,elieux/ghc,bitemyapp/ghc,vTurbine/ghc,holzensp/ghc,olsner/ghc,nushio3/ghc,elieux/ghc,mcschroeder/ghc,jstolarek/ghc,wxwxwwxxx/ghc,sdiehl/ghc,urbanslug/ghc,GaloisInc/halvm-ghc,green-haskell/ghc,ml9951/ghc,sgillespie/ghc,ghc-android/ghc,da-x/ghc,wxwxwwxxx/ghc,gcampax/ghc,olsner/ghc,snoyberg/ghc,tjakway/ghcjvm,tjakway/ghcjvm,mcschroeder/ghc,siddhanathan/ghc,TomMD/ghc,GaloisInc/halvm-ghc,acowley/ghc,nathyong/microghc-ghc,sgillespie/ghc,ghc-android/ghc,nkaretnikov/ghc,mfine/ghc,siddhanathan/ghc,olsner/ghc,urbanslug/ghc,AlexanderPankiv/ghc,lukexi/ghc,ezyang/ghc,wxwxwwxxx/ghc,holzensp/ghc,christiaanb/ghc,tibbe/ghc,spacekitteh/smcghc,bitemyapp/ghc,nathyong/microghc-ghc,fmthoma/ghc,wxwxwwxxx/ghc,da-x/ghc,mcschroeder/ghc,TomMD/ghc,ezyang/ghc,snoyberg/ghc,AlexanderPankiv/ghc,ml9951/ghc,da-x/ghc,gcampax/ghc,spacekitteh/smcghc,gridaphobe/ghc,ryantm/ghc,gcampax/ghc,olsner/ghc,mettekou/ghc,mettekou/ghc,christiaanb/ghc,nkaretnikov/ghc,fmthoma/ghc,ezyang/ghc,gridaphobe/ghc,fmthoma/ghc,mfine/ghc,da-x/ghc,acowley/ghc,GaloisInc/halvm-ghc,elieux/ghc,GaloisInc/halvm-ghc,siddhanathan/ghc,spacekitteh/smcghc,AlexanderPankiv/ghc,da-x/ghc,tjakway/ghcjvm,fmthoma/ghc,anton-dessiatov/ghc,sdiehl/ghc,fmthoma/ghc,bitemyapp/ghc,sgillespie/ghc,lukexi/ghc,TomMD/ghc,anton-dessiatov/ghc,vikraman/ghc,jstolarek/ghc,shlevy/ghc,TomMD/ghc,elieux/ghc,urbanslug/ghc,tibbe/ghc,sdiehl/ghc,nushio3/ghc,ghc-android/ghc,GaloisInc/halvm-ghc,bitemyapp/ghc,snoyberg/ghc,gridaphobe/ghc,christiaanb/ghc,ghc-android/ghc,forked-upstream-packages-for-ghcjs/ghc,oldmanmike/ghc,jstolarek/ghc,nkaretnikov/ghc,AlexanderPankiv/ghc,snoyberg/ghc,shlevy/ghc,ml9951/ghc,ghc-android/ghc,vikraman/ghc,oldmanmike/ghc,GaloisInc/halvm-ghc,nushio3/ghc,vikraman/ghc,urbanslug/ghc,green-haskell/ghc,siddhanathan/ghc,jstolarek/ghc