#850: threaded RTS uses SIGALRM
----------------------------+-----------------------------------------------
Reporter: simonmar | Owner: simonmar
Type: bug | Status: closed
Priority: normal | Milestone: 6.6.1
Component: Runtime System | Version: 6.4.2
Severity: normal | Resolution: fixed
Keywords: | Difficulty: Unknown
Testcase: | Architecture: Unknown
Os: Unknown |
----------------------------+-----------------------------------------------
Changes (by simonmar):
* resolution: => fixed
* status: new => closed
Comment:
The problem with `usleep()` is that it stops with `EINTR` whenever a
signal is received, and there's no way to restart it because it doesn't
let you know how much of the original time has expired. The right way
these days is to use `nanosleep()`, so I've added support for that to the
unix package:
{{{
Fri Mar 2 11:41:18 GMT 2007 Simon Marlow <[EMAIL PROTECTED]>
* don't retry usleep() on EINTR (see #850/#1156)
Fri Mar 2 13:28:18 GMT 2007 Simon Marlow <[EMAIL PROTECTED]>
* Provide nanosleep if we have it, and use it to implement usleep
Fixes #1156
}}}
The SIGALRM question is really orthogonal: `usleep` will be interrupted by
whatever signal we use. However, I've modified the RTS to use
`timer_create()` instead of `setitimer()` and therefore we now use
`SIGVTALRM` for timer signals on both the threaded and non-threaded RTSs:
{{{
Fri Mar 2 03:31:04 PST 2007 Simon Marlow <[EMAIL PROTECTED]>
* Use timer_create() for the interval timer, if available
}}}
I'll do the appropriate merging.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/850>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs