[lkml]   [2000]   [Oct]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: sigtimedwait with a zero timeout
    Henrik Nordstrom <> writes:

    > You are not late. In fact you are the first who have responded to my
    > linux-kernel messages at all.
    > Yes, I am well aware of sigwaitinfo.
    > sigwaitinfo blocks infinitely if there is no queued signals and is the
    > opposite of sigtimedwait with a zero timeout.

    Yes, sorry that's what I thought you wanted to do (Ie. you new some
    data was there and wanted to get it quickly).

    > sigwaitinfo is implemented as sigtimedwait with a NULL timeout which is
    > read as a timeout of MAX_SCHEDULE_TIMEOUT.

    Ahh I didn't know that.

    > sigtimedwait with a zero timeout are meant to be used by applications
    > needing to poll signal queues while doing other processing. Having
    > sigtimedwait always block for at least 10 ms can have a quite negative
    > impact on such applications.

    If you want to return imediatley (and there might not be data) the
    answer given is usually...

    sigqueue( ... );
    sigwaitinfo( ... );

    If the above will still schedule, then Linus might be more likely to
    take a patch (I'd guess that he'd look at sigtimedwait() to be like
    sleep() in most other cases though).

    James Antill --
    "If we can't keep this sort of thing out of the kernel, we might as well
    pack it up and go run Solaris." -- Larry McVoy.
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 12:39    [W:0.021 / U:1.396 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site