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 95EB71F463 for ; Mon, 16 Sep 2019 16:20:58 +0000 (UTC) Received: from localhost ([::1]:36676 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i9tkG-0004nR-Au for normalperson@yhbt.net; Mon, 16 Sep 2019 12:20:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59153) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i9slb-0000S6-3G for bug-gnulib@gnu.org; Mon, 16 Sep 2019 11:18:16 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:52183) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1i9sla-0004pn-Id; Mon, 16 Sep 2019 11:18:14 -0400 Received: from [176.228.60.248] (port=1724 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1i9slZ-0008Ac-T9; Mon, 16 Sep 2019 11:18:14 -0400 Date: Mon, 16 Sep 2019 18:18:11 +0300 Message-Id: <831rwgxob0.fsf@gnu.org> From: Eli Zaretskii To: Bruno Haible In-reply-to: <5307069.QXIAngi7cb@omega> (message from Bruno Haible on Sun, 15 Sep 2019 19:58:56 +0200) Subject: Re: [PATCH] findprog-in: Set errno to indicate why NULL was returned. References: <20190914193516.21375-1-psmith@gnu.org> <5307069.QXIAngi7cb@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: Paul Smith > Date: Sun, 15 Sep 2019 19:58:56 +0200 > > + - Otherwise, it sets errno and returns NULL. > + Specific errno values include: > + - ENOENT: means that the program's file was not found. > + - EACCESS: means that the program's file was found but lacks the > + execute permissions. The value of EACCES (not EACCESS!) on MS-Windows frequently means the file cannot be accessed for a reason that has nothing to do with execute permissions. It could be, for example, that some intermediate directory in the full file name doesn't exist or is otherwise inaccessible.