From: Eli Zaretskii <eliz@gnu.org>
To: Klaus-Dieter Bauer <bauer.klaus.dieter@gmail.com>
Cc: 33016@debbugs.gnu.org
Subject: bug#33016: 26.1; (make-process ...) doesn't signal an error, when executable given as absolute Windows path does not exist
Date: Fri, 19 Oct 2018 11:30:33 +0300 [thread overview]
Message-ID: <83y3aupcd2.fsf@gnu.org> (raw)
In-Reply-To: <CANtbJLEVLux4giW65UKREP7J_xVKz86Vvy+hZzEdHmEVcboaHQ@mail.gmail.com> (message from Klaus-Dieter Bauer on Fri, 19 Oct 2018 10:03:00 +0200)
> From: Klaus-Dieter Bauer <bauer.klaus.dieter@gmail.com>
> Date: Fri, 19 Oct 2018 10:03:00 +0200
> Cc: 33016@debbugs.gnu.org
>
> 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.
That's true, but the way Emacs invokes async subprocesses on Windows
cannot be similar to Unix, because Windows lacks the 'fork' system
call. Therefore, on Windows, the Emacs process itself invokes the
program, whereas on Unix this is done by a separate "forked" process,
which means Emacs on Unix simply doesn't know whether running the
program failed, until much later.
What this means is if some Lisp program wants to produce a consistent
behavior in these situations, it should have slightly different
application-level code for Posix and non-Posix hosts.
> Then again, calling programs by full path is probably rare, so it's probably a pretty low-priority issue.
Right.
next prev parent reply other threads:[~2018-10-19 8:30 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-11 12:55 bug#33016: 26.1; (make-process ...) doesn't signal an error, when executable given as absolute Windows path does not exist Klaus-Dieter Bauer
2018-10-11 14:22 ` Eli Zaretskii
2018-10-19 8:03 ` Klaus-Dieter Bauer
2018-10-19 8:30 ` Eli Zaretskii [this message]
2019-04-08 18:34 ` Noam Postavsky
2019-04-08 18:58 ` Eli Zaretskii
2019-04-09 14:13 ` Noam Postavsky
2019-04-09 14:33 ` Eli Zaretskii
2019-04-10 21:58 ` Noam Postavsky
2019-04-11 14:04 ` Eli Zaretskii
2019-04-11 17:34 ` Noam Postavsky
2019-04-11 17:55 ` Eli Zaretskii
2019-04-12 0:44 ` Noam Postavsky
2019-04-12 8:44 ` Eli Zaretskii
2019-04-12 18:20 ` Noam Postavsky
2019-04-12 18:44 ` Eli Zaretskii
2019-04-15 12:21 ` Noam Postavsky
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=83y3aupcd2.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=33016@debbugs.gnu.org \
--cc=bauer.klaus.dieter@gmail.com \
/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.