[Haskell-cafe] pthread_kill missing?

2009-11-18 Thread Gabor Greif
Hi all, I'd like to send a signal from the main thread to a forkOS-ed thread in GHC. The former should use raiseSignal and the second should sit in awaitSignal. I figured that the posix functionality in the unix-2.3 library does not cover this case. I would have expected that

Re: [Haskell-cafe] pthread_kill missing?

2009-11-18 Thread Svein Ove Aas
On Wed, Nov 18, 2009 at 2:03 PM, Gabor Greif ga...@mac.com wrote: PS: I guess some of you will say, use condition variables. But that won't answer my question :-) Actually, I was going to say use throwTo. Is there som reason you have to use the POSIX routines directly instead of using native

Re: [Haskell-cafe] pthread_kill missing?

2009-11-18 Thread Gabor Greif
Am 18.11.2009 um 14:15 schrieb Svein Ove Aas: On Wed, Nov 18, 2009 at 2:03 PM, Gabor Greif ga...@mac.com wrote: PS: I guess some of you will say, use condition variables. But that won't answer my question :-) Actually, I was going to say use throwTo. Is there som reason you have to use the

Re: [Haskell-cafe] pthread_kill missing?

2009-11-18 Thread sterl
Gabor Greif wrote: Because I'd like to eventually send signals from outside (e.g. a shell) too. This is in fact a stripped-down version of a real program written in C mainly to demonstrate how much easier it is to get the same functionality in Haskell. Much easier then to install a signal