From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 0AFF51F463 for ; Sat, 28 Sep 2019 12:18:06 +0000 (UTC) Received: from localhost ([::1]:60856 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iEBfo-0006Li-PD for normalperson@yhbt.net; Sat, 28 Sep 2019 08:18:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35508) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iEBfU-0006LP-Bb for bug-gnulib@gnu.org; Sat, 28 Sep 2019 08:17:45 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34038) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iEBfT-0005m6-Fd; Sat, 28 Sep 2019 08:17:43 -0400 Received: from [176.228.60.248] (port=3054 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iEBfS-000891-On; Sat, 28 Sep 2019 08:17:43 -0400 Date: Sat, 28 Sep 2019 15:17:36 +0300 Message-Id: <83r240haxr.fsf@gnu.org> From: Eli Zaretskii To: Bruno Haible In-reply-to: <50636743.vYNJyYVXY4@omega> (message from Bruno Haible on Sat, 28 Sep 2019 14:06:00 +0200) Subject: Re: new module 'access' References: <20190914193516.21375-1-psmith@gnu.org> <12557236.eQrKMWS1gB@omega> <83k1a7wis1.fsf@gnu.org> <50636743.vYNJyYVXY4@omega> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: bug-gnulib@gnu.org, psmith@gnu.org Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" > From: Bruno Haible > Cc: bug-gnulib@gnu.org, psmith@gnu.org > Date: Sat, 28 Sep 2019 14:06:00 +0200 > > There are different ways to test for "executable" on Windows: > - execlp/execvp, > - CreateProcess, > - system / popen, like you say, > - cmd.exe, > - surely more (PowerShell...) > > Let's assume that they work differently (cmd.exe definitely works differently > than execlp/execvp; I tested that). > > The module does not attempt to handle all of these, just the first one, > because > - the function access() is located at the C library level, > - it is compatible with what the old MSVCRT (without the argument check > for the mode in _access()) does. Well, at the very least how about documenting this subtlety? > If you consider the gnulib access() function unfit for some purpose, you must > also consider the old MSVCRT _acccess() function unfit for the same purpose. Of course I do. I hope Gnulib doesn't use MSVCRT as an example of a good implementation in this case ;-)