From owner-svn-src-head@FreeBSD.ORG Wed Aug 26 13:32:09 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 763781065690; Wed, 26 Aug 2009 13:32:09 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 483B28FC26; Wed, 26 Aug 2009 13:32:09 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id D730D46B09; Wed, 26 Aug 2009 09:32:08 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 36B508A02A; Wed, 26 Aug 2009 09:32:08 -0400 (EDT) From: John Baldwin To: Colin Percival Date: Wed, 26 Aug 2009 07:34:12 -0400 User-Agent: KMail/1.9.7 References: <200908260330.n7Q3U61l047845@svn.freebsd.org> In-Reply-To: <200908260330.n7Q3U61l047845@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200908260734.12893.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 26 Aug 2009 09:32:08 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r196558 - head/usr.bin/look X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Aug 2009 13:32:09 -0000 On Tuesday 25 August 2009 11:30:06 pm Colin Percival wrote: > Author: cperciva > Date: Wed Aug 26 03:30:06 2009 > New Revision: 196558 > URL: http://svn.freebsd.org/changeset/base/196558 > > Log: > Don't try to mmap the contents of empty files. This behaviour was harmless > prior to r195693, since historical behaviour of mmap(2) was to silently > ignore length-zero mmap requests; but mmap now returns EINVAL, which caused > look(1) to emit an error message and fail. FWIW, it did not silently ignore the request. Instead it rounded the size up to a page and mapped a page of data. However, if you then passed that pointer with a length of 0 to munmap() munmap() would fail. -- John Baldwin