lkml.org 
[lkml]   [2005]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Add pselect, ppoll system calls.
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 ❖

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-08-25 02:37    [W:0.094 / U:1.048 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site