GNU bug report logs - #54766
[PATCH] 28.1.0; Native comp: Inherit working directory for sub processes (MS Windows)

Previous Next

Package: emacs;

Reported by: Robin Putters <robin.putters <at> keronic.com>

Date: Thu, 7 Apr 2022 14:59:02 UTC

Severity: normal

Tags: moreinfo, patch

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 54766 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Robin Putters <robin.putters <at> keronic.com>
Cc: 54766 <at> debbugs.gnu.org
Subject: Re: bug#54766: [PATCH] 28.1.0;
 Native comp: Inherit working directory for sub processes (MS Windows)
Date: Thu, 07 Apr 2022 19:08:29 +0300
> From: Robin Putters <robin.putters <at> keronic.com>
> Date: Thu, 7 Apr 2022 14:35:57 +0000
> 
> On MS Windows systems, where the Emacs executable is typically not in the PATH, creating the async sub processes for the native compiler will fail because they are started in a random working directory. The included patch will inherit the working directory from the parent emacs process by setting default-directory before creating the sub process.    

Please tell more about the failure and its reasons.  The compilation
command does this:

                   (process (make-process
                             :name (concat "Compiling: " source-file)
                             :buffer (with-current-buffer
                                         (get-buffer-create
                                          comp-async-buffer-name)
                                       (setf buffer-read-only t)
			               (current-buffer))
                             :command (list
                                       (expand-file-name invocation-name
                                                         invocation-directory)
                                       "--batch" "-l" temp-file)

So the program we invoked already has its executable file name
expanded relative to invocation-directory, and we shouldn't need PATH
at all.  What am I missing?




This bug report was last modified 3 years and 78 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.