Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Jan 2000 11:43:41 +1100
From:      Peter Jeremy <peter.jeremy@alcatel.com.au>
To:        Mikhail Teterin <mi@kot.ne.mediaone.net>
Cc:        stable@FreeBSD.ORG, FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   Re: kern/13644
Message-ID:  <00Jan24.114342est.115214@border.alcanet.com.au>
In-Reply-To: <200001231636.LAA43285@rtfm.newton>; from mi@kot.ne.mediaone.net on Mon, Jan 24, 2000 at 03:37:19AM %2B1100
References:  <000a01bf655e$314bb6c0$021d85d1@youwant.to> <200001231636.LAA43285@rtfm.newton>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2000-Jan-24 03:37:19 +1100, Mikhail Teterin <mi@kot.ne.mediaone.net> wrote:
>=> =FreeBSD:
>=> ==> =>  If timeout is a non-nil pointer, it specifies a maximum
>=> ==> =>  interval to wait for the selection to complete.
...
>It  appears, that  you,  as well  as other  developers,  speak from  the
>implementation point of view. I only  look at the man-page. The man page
>says, the time out  is the UPPER limit.

Note that the man page talks about waiting for the _selection_ to
complete.  It does not refer to returning from the select(2) call.
And the behaviour is exactly as documented: when the specified
interval is complete, the process will return to the run queue for
normal scheduling (if it hasn't previously found a ready FD).  Unix
is not a real-time OS, so once a process is in the run queue, an
arbitrary period can expire before the process is actually run.

The only cases where a select(2) (or poll(2)) system call will return
before a specified period are:
1) A signal was received
2) One of the specified file descriptors became ready.

>sorts of  other man-pages from all  sorts of other vendors,  who all say
>(almost) the same thing:
>
>	that the timeout is indeed the UPPER limit, and not the LOWER.

Please provide a test program and results from these other vendors
demonstrating that their select() will return before the specified
time limit in the absence of any other event.

It's probably worthwhile adding a comment to select(2) similar to that
in sleep(3), noting that "system activity may lengthen the sleep by an
indeterminate amount."

Peter


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00Jan24.114342est.115214>