From: Christopher Wellons <wellons@nullprogram.com>
To: 30564@debbugs.gnu.org
Subject: bug#30564: call-process always fails for empty exec-path
Date: Tue, 20 Feb 2018 21:07:36 -0500 [thread overview]
Message-ID: <20180221020736.GE12719@nullprogram.com> (raw)
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.
next reply other threads:[~2018-02-21 2:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-21 2:07 Christopher Wellons [this message]
2018-04-14 19:56 ` bug#30564: call-process always fails for empty exec-path Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180221020736.GE12719@nullprogram.com \
--to=wellons@nullprogram.com \
--cc=30564@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.