Re: Add pselect, ppoll system calls.

From: Ulrich Drepper
Date: Wed Aug 24 2005 - 19:35:45 EST


David Woodhouse wrote:
> If it's mandatory that we actually call the signal handler, then we need
> to play tricks like sigsuspend() does to leave the old signal mask on
> the stack frame. That's a bit painful atm because do_signal is different
> between architectures.

It is necessary that the handler is called. This is the purpose of
these interfaces. If this means more complexity is needed then this is
how the cookie crumbles. One use case for pselect would be something
like this:


int got_signal;
void sigint_handler(int sig) {
got_signal = 1;
}

{
...
while (1) {
if (!got_signal)
pselect()

if (got_signal) {
handle signal
got_signal = 0;
}
}
...
}

--
â Ulrich Drepper â Red Hat, Inc. â 444 Castro St â Mountain View, CA â

Attachment: signature.asc
Description: OpenPGP digital signature