[Haskell-cafe] Re: syscall, sigpause and EINTR on Mac OSX

Branimir Maksimovic bmaxa at hotmail.com
Sun Dec 11 11:50:12 EST 2005

>From: Joel Reymont <joelr1 at gmail.com>
>To: Haskell Cafe <haskell-cafe at haskell.org>
>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() .

    while (!signals_pending() && !interrupted) {
	pause(); <<<<<<<<<< this is where it stops and waits for signals

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 
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 
>Haskell-Cafe mailing list
>Haskell-Cafe at haskell.org

Express yourself instantly with MSN Messenger! Download today it's FREE! 

More information about the Haskell-Cafe mailing list