
From: Joel Reymont
To: Haskell Cafe Subject: [Haskell-cafe] Re: syscall, sigpause and EINTR on Mac OSX Date: Sun, 11 Dec 2005 16:33:36 +0000 I looked at the scheduler source code and it appears that GHC goes to wait for signals when a deadlock is detected and there's nothing else to do.
It still does not explain where the signal comes from when I'm away from the keyboard.
This is not signal, it is result from call to pause() . #if !defined(RTS_SUPPORTS_THREADS) void awaitUserSignals(void) { while (!signals_pending() && !interrupted) { pause(); <<<<<<<<<< this is where it stops and waits for signals } } #endif you have to look elsewhere as this is normal behavior. Strange is that you are using threaded run time (I guess ) but this function is defined only for single threaded variant. This I implied from #if !defined(RTS_SUPPORTS_THREADS) Greetings, Bane.
On Dec 11, 2005, at 4:10 PM, Joel Reymont wrote:
(gdb) where #0 0x90006068 in syscall () #1 0x9004420c in sigpause () #2 0x001791b8 in awaitUserSignals () at Signals.c:256 #3 0x0012e1a8 in schedule (mainThread=0x1300360, initialCapability=0x0) at Schedule.c:518 [...] My program is currently stuck here. The man pages say that sigpause will only terminate by being interrupted and EINTR will be the errno. EINTR is signal 2, the same one that I'm trapping and the one sent when ^C is pressed.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
_________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/