From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/1195 Path: news.gmane.org!not-for-mail From: Jim Meyering Newsgroups: gmane.comp.lib.gnulib.bugs,gmane.linux.lib.musl.general Subject: Re: musl, fdopen test Date: Tue, 19 Jun 2012 13:09:48 +0200 Message-ID: <87mx3z36df.fsf@rho.meyering.net> References: <20120609230541.47eac2de@newbook> <4FDFDEEC.8050304@redhat.com> <20120619025232.GL163@brightrain.aerifal.cx> <3323564.O6CdZoD93U@linuix> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1340104208 24379 80.91.229.3 (19 Jun 2012 11:10:08 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 19 Jun 2012 11:10:08 +0000 (UTC) Cc: musl@lists.openwall.com, Rich Felker , bug-gnulib@gnu.org, Eric Blake , Isaac Dunham To: Bruno Haible Original-X-From: bug-gnulib-bounces+gnu-bug-gnulib=m.gmane.org@gnu.org Tue Jun 19 13:10:05 2012 Return-path: Envelope-to: gnu-bug-gnulib@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SgwJt-0001SM-Mq for gnu-bug-gnulib@m.gmane.org; Tue, 19 Jun 2012 13:10:01 +0200 Original-Received: from localhost ([::1]:46943 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SgwJt-0006kZ-Jy for gnu-bug-gnulib@m.gmane.org; Tue, 19 Jun 2012 07:10:01 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:48435) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SgwJn-0006kR-2I for bug-gnulib@gnu.org; Tue, 19 Jun 2012 07:09:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SgwJi-0008AW-8L for bug-gnulib@gnu.org; Tue, 19 Jun 2012 07:09:54 -0400 Original-Received: from mx.meyering.net ([88.168.87.75]:48903) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SgwJi-0008AN-1k for bug-gnulib@gnu.org; Tue, 19 Jun 2012 07:09:50 -0400 Original-Received: from rho.meyering.net (rho.meyering.net [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id 17DF86009B; Tue, 19 Jun 2012 13:09:48 +0200 (CEST) In-Reply-To: <3323564.O6CdZoD93U@linuix> (Bruno Haible's message of "Tue, 19 Jun 2012 13:03:38 +0200") Original-Lines: 21 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 88.168.87.75 X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnulib-bounces+gnu-bug-gnulib=m.gmane.org@gnu.org Original-Sender: bug-gnulib-bounces+gnu-bug-gnulib=m.gmane.org@gnu.org Xref: news.gmane.org gmane.comp.lib.gnulib.bugs:31048 gmane.linux.lib.musl.general:1195 Archived-At: Bruno Haible wrote: ... >> My thought in having musl skip the test is to maximize performance of >> fdopen, assuming you might be using it in a situation like on a newly >> accept()ed network connection where every syscall counts (think >> multi-threaded httpd). For read-only fdopen, no syscalls are needed, > > Sounds reasonable. > > Here's a proposed patch to remove gnulib's unintentional requirement. > > > 2012-06-19 Bruno Haible > > fdopen: Allow implementations that don't reject invalid fd arguments. > * m4/fdopen.m4 (gl_FUNC_FDOPEN): Let the test pass if fdopen(-1,...) > succeeds. > Reported by Rich Felker . Thanks, Bruno. That patch looks perfect.