From owner-freebsd-stable Sun Jan 23 16:43:18 2000 Delivered-To: freebsd-stable@freebsd.org Received: from alcanet.com.au (mail.alcanet.com.au [203.62.196.10]) by hub.freebsd.org (Postfix) with ESMTP id 056B114D5D; Sun, 23 Jan 2000 16:43:12 -0800 (PST) (envelope-from jeremyp@gsmx07.alcatel.com.au) Received: by border.alcanet.com.au id <115214>; Mon, 24 Jan 2000 11:43:42 +1100 Content-return: prohibited From: Peter Jeremy Subject: Re: kern/13644 In-reply-to: <200001231636.LAA43285@rtfm.newton>; from mi@kot.ne.mediaone.net on Mon, Jan 24, 2000 at 03:37:19AM +1100 To: Mikhail Teterin Cc: stable@FreeBSD.ORG, FreeBSD-gnats-submit@FreeBSD.ORG Message-Id: <00Jan24.114342est.115214@border.alcanet.com.au> MIME-version: 1.0 X-Mailer: Mutt 1.0i Content-type: text/plain; charset=us-ascii References: <000a01bf655e$314bb6c0$021d85d1@youwant.to> <200001231636.LAA43285@rtfm.newton> Date: Mon, 24 Jan 2000 11:43:41 +1100 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 2000-Jan-24 03:37:19 +1100, Mikhail Teterin 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