Re: RT Sigio broken on 2.4.19-pre8

From: Dan Kegel (dank@kegel.com)
Date: Mon May 27 2002 - 20:07:56 EST


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?
- Dan

#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));

        // 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/



This archive was generated by hypermail 2b29 : Fri May 31 2002 - 22:00:21 EST