From owner-cvs-all Wed Jul 12 19: 7: 8 2000 Delivered-To: cvs-all@freebsd.org Received: from pike.osd.bsdi.com (pike.osd.bsdi.com [204.216.28.222]) by hub.freebsd.org (Postfix) with ESMTP id 6D4F937C113; Wed, 12 Jul 2000 19:07:00 -0700 (PDT) (envelope-from jhb@foo.osd.bsdi.com) Received: from foo.osd.bsdi.com (root@foo.osd.bsdi.com [204.216.28.137]) by pike.osd.bsdi.com (8.9.3/8.9.3) with ESMTP id TAA58214; Wed, 12 Jul 2000 19:06:51 -0700 (PDT) (envelope-from jhb@foo.osd.bsdi.com) Received: (from jhb@localhost) by foo.osd.bsdi.com (8.9.3/8.9.3) id TAA43227; Wed, 12 Jul 2000 19:05:59 -0700 (PDT) (envelope-from jhb) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Wed, 12 Jul 2000 19:05:59 -0700 (PDT) Organization: BSD, Inc. From: John Baldwin To: Wesley Morgan Subject: Re: cvs commit: src/sys/kern sys_generic.c Cc: cvs-all@FreeBSD.ORG, cvs-committers@FreeBSD.ORG Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 13-Jul-00 Wesley Morgan wrote: > I don't want to point fingers, but.... I just rebuilt a kernel and > installed a new world and now syslogd is happily flying through > select() as fast as it can... Ooph, now inetd is and syslogd is > silent... Very odd :) Argh! For infinite timeouts we were only setting tv_sec to 0 and not tv_usec. Thus, tv_usec contained whatever garbage it already contained, and if it was != 0, then select would treat it as a very short timeout instead of blocking until it received input. > On Wed, 12 Jul 2000, John Baldwin wrote: > >> jhb 2000/07/12 15:46:41 PDT >> >> Modified files: >> sys/kern sys_generic.c >> Log: >> Fix a very obscure bug in select() and poll() where the timeout would >> never expire if poll() or select() was called before the system had been >> in multiuser for 1 second. This was caused by only checking to see if >> tv_sec was zero rather than checking both tv_sec and tv_usec. >> >> Revision Changes Path >> 1.60 +3 -3 src/sys/kern/sys_generic.c >> >> >> >> To Unsubscribe: send mail to majordomo@FreeBSD.org >> with "unsubscribe cvs-all" in the body of the message >> > > -- > _ __ ___ ____ ___ ___ ___ > Wesley N Morgan _ __ ___ | _ ) __| \ > wesleymorgan@home.com _ __ | _ \._ \ |) | > FreeBSD: The Power To Serve _ |___/___/___/ > Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread! > > -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.cslab.vt.edu/~jobaldwi/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message