From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4523 invoked by alias); 11 Sep 2017 18:03:59 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 4513 invoked by uid 89); 11 Sep 2017 18:03:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=H*M:5253 X-HELO: zimbra.cs.ucla.edu Subject: Re: [PATCH 3/9] posix: Allow glob to match dangling symlinks [BZ #866] To: Zack Weinberg Cc: Joseph Myers , Adhemerval Zanella , Andreas Schwab , GNU C Library References: <1504643122-14874-1-git-send-email-adhemerval.zanella@linaro.org> <1504643122-14874-4-git-send-email-adhemerval.zanella@linaro.org> <878thop5fa.fsf@linux-m68k.org> <9455e298-8c48-c42a-0ec3-ffb8d166c69b@linaro.org> <450d2eab-f21a-f90c-6210-ea638787e339@cs.ucla.edu> <403decc7-e039-9be1-fb44-25d611540156@linaro.org> <7bf58b8a-afc9-b934-9a4a-1616e71c03ff@cs.ucla.edu> From: Paul Eggert Message-ID: <805e4d8a-de63-5253-e214-b3912ed221e3@cs.ucla.edu> Date: Mon, 11 Sep 2017 18:03:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2017-09/txt/msg00458.txt.bz2 On 09/11/2017 10:56 AM, Zack Weinberg wrote: > So here's an alternative, less thorough but perhaps also less costly > approach: when GLOB_ALTDIRFUNCS is set, call both gl_stat and gl_lstat > on the first name that's going to be returned, even if we have no > other reason to do this. Something like that would be better, yes. Still not sure it's worth the trouble. We don't know how expensive gl_stat and gl_lstat will be, in general.