[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#30564: call-process always fails for empty exec-path
From: |
Christopher Wellons |
Subject: |
bug#30564: call-process always fails for empty exec-path |
Date: |
Tue, 20 Feb 2018 21:07:36 -0500 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
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.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#30564: call-process always fails for empty exec-path,
Christopher Wellons <=