From owner-freebsd-current Wed Nov 13 11:47:49 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3C17B37B401 for ; Wed, 13 Nov 2002 11:47:48 -0800 (PST) Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9F27643E91 for ; Wed, 13 Nov 2002 11:47:47 -0800 (PST) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: from khavrinen.lcs.mit.edu (localhost [IPv6:::1]) by khavrinen.lcs.mit.edu (8.12.3/8.12.5) with ESMTP id gADJlken066492 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Wed, 13 Nov 2002 14:47:47 -0500 (EST) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.12.3/8.12.5/Submit) id gADJlkfV066489; Wed, 13 Nov 2002 14:47:46 -0500 (EST) (envelope-from wollman) Date: Wed, 13 Nov 2002 14:47:46 -0500 (EST) From: Garrett Wollman Message-Id: <200211131947.gADJlkfV066489@khavrinen.lcs.mit.edu> To: Nate Lawson Cc: current@FreeBSD.ORG Subject: Re: sleep(1) behavior In-Reply-To: References: <200211131903.gADJ3OuR066070@khavrinen.lcs.mit.edu> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG < said: > So "sleep -1" should sleep for ~0UL seconds? And should usage() ever be > called then? Well, the standard says that anything might happen as a result of `sleep -- -1'. I'm just pointing out why the standard says so. (This sort of thing is what is referred to in the standards jargon as ``quality of implementation'' -- the standard doesn't require an error for this case, because doing so would require implementations to partially reimplement strtoul() in the sleep utility, just to validate the argument. The standard does not prohibit an implementor from going to this effort, however, and if you are already using strtod() instead of strtoul(), there's no additional effort required.) -GAWollman To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message