From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: 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 Message-ID: <83r168c1vm.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="532"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 54766@debbugs.gnu.org To: Robin Putters Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 07 18:12:17 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ncUk4-000AUb-C6 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 07 Apr 2022 18:12:16 +0200 Original-Received: from localhost ([::1]:45994 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ncUk3-0002iB-24 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 07 Apr 2022 12:12:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60292) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ncUgx-0008AN-Ra for bug-gnu-emacs@gnu.org; Thu, 07 Apr 2022 12:09:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39296) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ncUgv-0002Zi-OP for bug-gnu-emacs@gnu.org; Thu, 07 Apr 2022 12:09:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ncUgv-0001CU-I4 for bug-gnu-emacs@gnu.org; Thu, 07 Apr 2022 12:09: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: Thu, 07 Apr 2022 16:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54766 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 54766-submit@debbugs.gnu.org id=B54766.16493477084569 (code B ref 54766); Thu, 07 Apr 2022 16:09:01 +0000 Original-Received: (at 54766) by debbugs.gnu.org; 7 Apr 2022 16:08:28 +0000 Original-Received: from localhost ([127.0.0.1]:33193 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ncUgO-0001Bd-9U for submit@debbugs.gnu.org; Thu, 07 Apr 2022 12:08:28 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:38638) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ncUgN-0001BR-4j for 54766@debbugs.gnu.org; Thu, 07 Apr 2022 12:08:27 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:51086) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ncUgH-0002Xh-Lh; Thu, 07 Apr 2022 12:08:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=xEQ8E4iANW5REMz3uEtDszTfEN5obmsG8+rFgHAe3Yc=; b=INpL8LG5sfzx RW5Rob/hVFYGj509IOAwLp5zJcyx7yIAx+ndekGssffFTjZps1qXd5mOB9TXDIyOG8RQ2XzX2xoJD 4Y2cQz+Rw9cSANQH7Nfpo/zRkofB4jTq9NM60C8BfxPaLOWuaqYCGx/fl2xACTNL4TXun2SzG0PFw 8XdE033GbEuifu9ngqo15ggLag7mrX9q+gasMb7XqxgjHp6Dq0AkWM6+/vJ+2C1Hpy79TpT0T/zan HxCgjfF1xmMtS9xzLTXLtAFAEbAUVHTft8fzVBO+vbub8ahNtplcIEyLa6T/FdHXgXTvuiWqEuqLB 7DVz8oj40aNaAadE75yqxQ==; Original-Received: from [87.69.77.57] (port=2519 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ncUgF-0005K3-Kc; Thu, 07 Apr 2022 12:08:20 -0400 In-Reply-To: (message from Robin Putters on Thu, 7 Apr 2022 14:35:57 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:229533 Archived-At: > From: Robin Putters > 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?