From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Christopher Wellons Newsgroups: gmane.emacs.bugs Subject: bug#30564: call-process always fails for empty exec-path Date: Tue, 20 Feb 2018 21:07:36 -0500 Message-ID: <20180221020736.GE12719@nullprogram.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Trace: blaine.gmane.org 1519178779 8847 195.159.176.226 (21 Feb 2018 02:06:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 21 Feb 2018 02:06:19 +0000 (UTC) User-Agent: Mutt/1.5.23 (2014-03-12) To: 30564@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Feb 21 03:06:14 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eoJnS-0001Ri-N8 for geb-bug-gnu-emacs@m.gmane.org; Wed, 21 Feb 2018 03:06:14 +0100 Original-Received: from localhost ([::1]:58699 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoJpN-0003AH-SV for geb-bug-gnu-emacs@m.gmane.org; Tue, 20 Feb 2018 21:08:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60894) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoJpG-0003A7-2p for bug-gnu-emacs@gnu.org; Tue, 20 Feb 2018 21:08:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eoJpC-0005z2-Uf for bug-gnu-emacs@gnu.org; Tue, 20 Feb 2018 21:08:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45570) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eoJpC-0005ys-RC for bug-gnu-emacs@gnu.org; Tue, 20 Feb 2018 21:08:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eoJpC-00053e-Je for bug-gnu-emacs@gnu.org; Tue, 20 Feb 2018 21:08:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Christopher Wellons Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 Feb 2018 02:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 30564 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.151917887219421 (code B ref -1); Wed, 21 Feb 2018 02:08:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 21 Feb 2018 02:07:52 +0000 Original-Received: from localhost ([127.0.0.1]:53467 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eoJp1-00053B-OM for submit@debbugs.gnu.org; Tue, 20 Feb 2018 21:07:51 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:41663) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eoJp0-00052w-Dw for submit@debbugs.gnu.org; Tue, 20 Feb 2018 21:07:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eoJou-0005rp-7x for submit@debbugs.gnu.org; Tue, 20 Feb 2018 21:07:45 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:48659) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eoJou-0005rj-45 for submit@debbugs.gnu.org; Tue, 20 Feb 2018 21:07:44 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60867) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eoJot-000371-74 for bug-gnu-emacs@gnu.org; Tue, 20 Feb 2018 21:07:43 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eoJoq-0005pl-2O for bug-gnu-emacs@gnu.org; Tue, 20 Feb 2018 21:07:43 -0500 Original-Received: from mail.nullprogram.com ([192.241.191.137]:49900) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eoJop-0005o7-Uu for bug-gnu-emacs@gnu.org; Tue, 20 Feb 2018 21:07:40 -0500 Original-Received: from nullprogram.com (localhost [127.0.0.1]) by mail.nullprogram.com (Postfix) with ESMTPS id 9ACF7C1DDD for ; Tue, 20 Feb 2018 21:07:37 -0500 (EST) Content-Disposition: inline X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:143527 Archived-At: The call-process function incorrectly fails for valid absolute paths when exec-path is nil: (let ((exec-path ())) (call-process "/bin/ls")) ;; error: (file-error "Searching for program" ;; "No such file or directory" "/bin/ls") Adding a single element to exec-path fixes the problem, even if that element is nonsense: (let ((exec-path '(t))) (call-process "/bin/ls")) ;; => 0 The bug is in the for loop in openp() (lread.c). The only successful returns are found inside the loop. An empty list results in no loop iterations, which means an absolute path has no chance to return successfully. This bug dates back at least as far as Emacs 24.3.