From owner-freebsd-bugs Mon Dec 27 20:49:36 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from kot.ne.mediaone.net (kot.ne.mediaone.net [24.218.15.190]) by hub.freebsd.org (Postfix) with ESMTP id 62D7E1538F; Mon, 27 Dec 1999 20:49:31 -0800 (PST) (envelope-from mi@kot.ne.mediaone.net) Received: from rtfm.newton (rtfm.newton [10.10.0.1]) by kot.ne.mediaone.net (8.9.3/8.9.1) with ESMTP id XAA55798; Mon, 27 Dec 1999 23:49:29 -0500 (EST) From: Mikhail Teterin X-Relay-IP: 10.10.0.1 Received: (from mi@localhost) by rtfm.newton (8.9.3/8.9.3) id XAA78153; Mon, 27 Dec 1999 23:49:28 -0500 (EST) (envelope-from mi@kot.ne.mediaone.net) Message-Id: <199912280449.XAA78153@rtfm.newton> Subject: Re: kern/13644 In-Reply-To: from Bruce Evans at "Dec 28, 1999 03:18:25 pm" To: Bruce Evans Date: Mon, 27 Dec 1999 23:49:28 -0500 (EST) Cc: jasone@FreeBSD.ORG, freebsd-bugs@FreeBSD.ORG, FreeBSD-gnats-submit@FreeBSD.ORG, lawlopez@cisco.com, jseger@FreeBSD.ORG X-Face: %UW#n0|w>ydeGt/b@1-.UFP=K^~-:0f#O:D7w hJ5G_<5143Bb3kOIs9XpX+"V+~$adGP:J|SLieM31VIhqXeLBli" jasone@FreeBSD.ORG once stated: = => =select() guarantees that it will sleep at least as long as the timeout => =before returning an empty result (0). => => This is NOT what the man page states: => => If timeout is a non-nil pointer, it specifies a maximum => interval to wait for the selection to complete. = =This is a bug in the man page. It is so poorly worded that it is =broken. The Solaris man-page says the same (man -s 3c select): If timeout is not a NULL pointer, it specifies a maximum interval to wait for the selection to complete. And Linux (man 2 select): timeout is an upper bound on the amount of time elapsed before select returns. Are both of them wrong too?.. I'm sure TCL developers saw more selects then me, and they only account for the possibility of an _earlier_ return from select. => =If the number of ticks passed to tsleep() were reduced by one, this => =guarantee would no longer be possible. => = => =This is not a bug; it is an artifact of correct implementation. If => =you need higher resolution, use nanosleep(). = =There seems to be a problem with both the pthread and the kernel adding =one tick. Yes... With all due respect, IMHO, this PR should be re-opened. -mi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message