From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs 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 Message-ID: <83y3aupcd2.fsf@gnu.org> References: <835zy8y34x.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1539937832 6643 195.159.176.226 (19 Oct 2018 08:30:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 19 Oct 2018 08:30:32 +0000 (UTC) Cc: 33016@debbugs.gnu.org To: Klaus-Dieter Bauer Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 19 10:30:28 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 1gDQAu-0001bw-1y for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Oct 2018 10:30:28 +0200 Original-Received: from localhost ([::1]:47849 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDQD0-0003SZ-4M for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Oct 2018 04:32:38 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59127) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDQCo-0003OJ-1S for bug-gnu-emacs@gnu.org; Fri, 19 Oct 2018 04:32:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gDQCe-0000HA-6U for bug-gnu-emacs@gnu.org; Fri, 19 Oct 2018 04:32:24 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53856) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gDQCP-00006g-TE for bug-gnu-emacs@gnu.org; Fri, 19 Oct 2018 04:32:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gDQCP-0000No-Nx for bug-gnu-emacs@gnu.org; Fri, 19 Oct 2018 04:32:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 19 Oct 2018 08:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33016 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 33016-submit@debbugs.gnu.org id=B33016.15399378671393 (code B ref 33016); Fri, 19 Oct 2018 08:32:01 +0000 Original-Received: (at 33016) by debbugs.gnu.org; 19 Oct 2018 08:31:07 +0000 Original-Received: from localhost ([127.0.0.1]:58114 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gDQBX-0000MO-4M for submit@debbugs.gnu.org; Fri, 19 Oct 2018 04:31:07 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:48953) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gDQBU-0000Ls-Vb for 33016@debbugs.gnu.org; Fri, 19 Oct 2018 04:31:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gDQBL-0005A9-R8 for 33016@debbugs.gnu.org; Fri, 19 Oct 2018 04:30:59 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:51879) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDQBL-00058Y-H4; Fri, 19 Oct 2018 04:30:55 -0400 Original-Received: from [176.228.60.248] (port=4513 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gDQBK-0002HL-W6; Fri, 19 Oct 2018 04:30:55 -0400 In-reply-to: (message from Klaus-Dieter Bauer on Fri, 19 Oct 2018 10:03:00 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:151428 Archived-At: > From: Klaus-Dieter Bauer > 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.