From owner-freebsd-arch@FreeBSD.ORG Thu May 17 10:12:47 2007 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 69C6216A400 for ; Thu, 17 May 2007 10:12:47 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (c220-239-3-125.belrs4.nsw.optusnet.com.au [220.239.3.125]) by mx1.freebsd.org (Postfix) with ESMTP id C243713C458 for ; Thu, 17 May 2007 10:12:46 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by turion.vk2pj.dyndns.org (8.14.1/8.14.1) with ESMTP id l4H9ijOw001718; Thu, 17 May 2007 19:44:45 +1000 (EST) (envelope-from peter@turion.vk2pj.dyndns.org) Received: (from peter@localhost) by turion.vk2pj.dyndns.org (8.14.1/8.14.1/Submit) id l4H9ij8b001717; Thu, 17 May 2007 19:44:45 +1000 (EST) (envelope-from peter) Date: Thu, 17 May 2007 19:44:45 +1000 From: Peter Jeremy To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Message-ID: <20070517094445.GD1149@turion.vk2pj.dyndns.org> References: <86odknqvf3.fsf@dwp.des.no> <86wszah2ua.fsf@dwp.des.no> <86fy5wkim5.fsf@dwp.des.no> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="pf9I7BMVVzbSWLtt" Content-Disposition: inline In-Reply-To: <86fy5wkim5.fsf@dwp.des.no> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.15 (2007-04-06) Cc: MQ , freebsd-arch@freebsd.org Subject: Re: A problem with the select(2) interface X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2007 10:12:47 -0000 --pf9I7BMVVzbSWLtt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2007-May-16 15:23:14 +0200, Dag-Erling Smrgrav wrote: >MQ writes: >> No, that is not what I want. I think we'd better add a comments that >> we *DO NOT WRITE TO THAT ADDRESS*, what the manual describes is that >> there may be some platforms which write to that address. It's not the >> same thing. > >Some platforms update the timeval and some don't, so portable >applications must simply assume that its contents are undefined after >the select(2) call. It can not be relied on to contain either the >initial value nor the amount of time remaining. Thus your proposed >change is pointless. I disagree. The FreeBSD man pages should document the behaviour of FreeBSD. It's all very nice stating that SUSv2 allows a system to modify the value passed as timeout but (IMNSHO), it is more important to document what FreeBSD actually does. I agree that a _portable_ application must assume that timeout will be undefined but that's no reason for refusing to document what FreeBSD's behaviour actually is. There are two situations where the actual behaviour matters: 1) Porting a random application that assumes specific behaviour for select(). I need to know how FreeBSD behaves to know whether I need to patch the code or not. 2) I'm writing code that is specifically for FreeBSD. If I know timeout will not change, I can optimise the code to avoid having to re-initialise timeout before each select call. --=20 Peter Jeremy --pf9I7BMVVzbSWLtt Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFGTCQN/opHv/APuIcRAsCUAJ9n8LtooI01J4ma2ZlhAFeBJj1CkACgnFjB tF7eMcezXzrQtODHHZrW9ko= =1sRp -----END PGP SIGNATURE----- --pf9I7BMVVzbSWLtt--