"awaitSignal Nothing" does not block thread with -threaded
Consider the following code:
module Main where
import System.Posix.Signals
import Control.Concurrent
main :: IO ()
main = do
awaitSignal Nothing >> yield
According to the System.Posix.Signals haddock, "awaitSignal Nothing" should call pause(2), causing main thread to block until some signal has arrived. This is indeed what happens when this code is compiled by GHC 7.0.1 like so: "ghc --make awaitSignal.hs".
However, when compiled with -threaded, this code exits immediately when run. I think this is a bug in -threaded runtime.
I've tested with GHC 6.12.1, and this behavior is present there as well. Maybe I'm missing something non-obvious here?
My environment: x86, Debian sid, GHC 6.12.1 from Debian packages, GHC 7.0.1 from binary packages from GHC site.
Trac metadata
Trac field | Value |
---|---|
Version | 7.0.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Runtime System |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |