lkml.org 
[lkml]   [2002]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: RT Sigio broken on 2.4.19-pre8
Dan Kegel wrote:
>
> Aaron Sethman wrote:
> > > > Using the Dan Kegel's Poller_bench utility I noticed that RT SIGIO is not
> > > > working on 2.4.19-pre8. Basically sigtimedwait() is always returning
> > > > SIGIO. Note that 2.4.18 works fine.
> > > > ... It seems rtsig-nr keeping rising slowly as the system runs.
>
> That sounds like the way I'm clearing the signal queue is not working.
> Here's a minimal test case for clearing the signal queue. Could
> you try it and tell me what it says?

Er, forgot to send the signal. Corrected test case:

#include <stdio.h>
#include <signal.h>
#include <assert.h>

int main(int argc, char **argv)
{
sigset_t sigset;
siginfo_t info;
static struct timespec timeout = {0,0};
// block delivery of SIGRTMIN
sigemptyset(&sigset);
sigaddset(&sigset, SIGRTMIN);
assert(0 == sigprocmask(SIG_BLOCK, &sigset, NULL));
raise(SIGRTMIN);

// clear signal queue
assert(0 == signal(SIGRTMIN, SIG_IGN)); // POSIX says this clears the queue
// Make sure that cleared the queue. (Note that timeout is zero here.)
assert(sigtimedwait(&sigset, &info, &timeout) != SIGRTMIN);
printf("test passed\n");
exit(0);
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:26    [from the cache]
©2003-2011 Jasper Spaans