Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Jul 2000 19:05:59 -0700 (PDT)
From:      John Baldwin <jhb@FreeBSD.ORG>
To:        Wesley Morgan <morganw@chemicals.tacorp.com>
Cc:        cvs-all@FreeBSD.ORG, cvs-committers@FreeBSD.ORG
Subject:   Re: cvs commit: src/sys/kern sys_generic.c
Message-ID:  <XFMail.000712190559.jhb@FreeBSD.org>
In-Reply-To: <Pine.BSF.4.21.0007122109490.11103-100000@volatile.chemicals.tacorp.com>

next in thread | previous in thread | raw e-mail | index | archive | help

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 <jhb@FreeBSD.org> -- 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.000712190559.jhb>