Signal Handling Woes
Simon Marlow
simonmar at microsoft.com
Thu Nov 6 10:05:24 EST 2003
> >> -) Don't use pthread_kill, abolish the pending_handler_buf
> and use a
> >> pipe to send the information from the signal handelr to
> the scheduler
> >> loop.
>
> Can we assume that signal values fit into a single byte?
> That would simplify sending it over the pipe, as we wouldn't need to
> worry about read() or write() getting interrupted by other
> signals and
> things like that. Did I overlook some guarantee that signal numbers
> will be "small integers" or something like that, or are there in fact
> systems with signal numbers > 255?
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).
Cheers,
Simon
More information about the Cvs-ghc
mailing list