GNU bug report logs -
#33016
26.1; (make-process ...) doesn't signal an error, when executable given as absolute Windows path does not exist
Previous Next
Reported by: Klaus-Dieter Bauer <bauer.klaus.dieter <at> gmail.com>
Date: Thu, 11 Oct 2018 12:57:01 UTC
Severity: minor
Tags: fixed
Found in version 26.1
Fixed in version 27.1
Done: Noam Postavsky <npostavs <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 33016 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Thu, Oct 11, 2018 at 4:22 PM Eli Zaretskii <eliz <at> gnu.org> wrote:
> > From: Klaus-Dieter Bauer <bauer.klaus.dieter <at> gmail.com>
> > Date: Thu, 11 Oct 2018 14:55:27 +0200
> >
> > Entering
> >
> > M-x eval-expression RET
> > (make-process :name "test" :command '("No Such Command"))
> >
> > will bring up the debugger with
> >
> > (file-missing "Searching for program" "No such file or directory"
> "nosuchcommand")
> >
> > However, entering
> >
> > M-x eval-expression RET
> > (make-process :name "test" :command '("c:/No Such Command"))
> >
> > will merely display in the echo-area message:
> >
> > eval: Spawning child process: Invalid argument
> >
> > I stumbled upon this when debugging a quick-and-dirty
> > script, that called a program by absolute path. When a new
> > version of the program changed the name of the executable
> > (tex2lyx2.3 -> tex2lyx), this issue occurred, and hindered
> > debugging the problem.
> >
> > The wording of the message might indicate a
> > Windows-specific issue.
>
> The error in the second case is Windows specific, but the
> inconsistency isn't: on Unix the second case "succeeds", in that it
> returns a process object without any error messages.
>
> The error message you see in the first case is because Emacs searches
> for the program along exec-path (because it is not an absolute file
> name). In the second case this search is not done, because the file
> name is already absolute.
>
> So I don't think this is a bug.
>
Now I understand the intent of the implementation better. However, the
Unix/Windows difference still seems like a bug to me.
On Unix, the elisp will succeed, but the output and exit-status of the
process clarify the issue.
On Windows, a non-local exit occurs due to the resulting exception.
As example:
(let (p)
(setq p
(make-process :name "test" :command '("/tmp/nosuchcommand") :buffer
(current-buffer)))
;; -- Subsequent code never reached on Windows
(while (process-live-p p)
(sleep-for 0.01))
(message "(Process exit status %d)"
(process-exit-status p)))
So on Windows two issues occur:
- The exception doesn't indicate what went wrong.
- The control-flow of the Elisp program is different from Unix.
This different seems, like it may give rise to Windows-specific bugs, that
would be unnecessarily hard to debug.
Then again, calling programs by full path is probably rare, so it's
probably a pretty low-priority issue.
- Klaus
[Message part 2 (text/html, inline)]
This bug report was last modified 6 years and 32 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.