Could you just use the pipe as a wakeup mechanism, and store the signal information in another buffer? I imagine we'll probably want to store more than just the signal number anyway (eg. for SIGCHLD we want to store the pid of the process that completed).
Wakeup is not the only problem here; the problem is synchronisation. How can we serialize access to that "other buffer" if we have multiple signals arriving in multiple threads?
I'll see if I can send all the data over the pipe - if I make sure the write is not interrupted, it should be atomic... or isn't it?
If pipes don't work, we're running out of portable options:
1) the currently implemented method - resending every signal to the thread that does select() - works, but readline interferes with this.
2) using pthread_mutexes works on Mac OS X, but is not guaranteed to work anywhere else.
3) sending everything over a pipe - might work
4) using atomic increment operations to access a buffer - definitely works, but is there a platform-independent API for this?
Cheers,
Wolfgang
_______________________________________________ Cvs-ghc mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/cvs-ghc
