From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.bugs Subject: bug#62004: 30.0.50; comp-run-async-workers failure when default-directory deleted Date: Tue, 07 Mar 2023 16:00:39 +0000 Message-ID: References: <874jqxyhfo.fsf@gmail.com> <83sfeh7rlm.fsf@gnu.org> <87zg8px01l.fsf@gmail.com> <83mt4p7mv4.fsf@gnu.org> <87v8jdww42.fsf@gmail.com> <83jzzt7iac.fsf@gnu.org> <87jzztwo9h.fsf@gmail.com> <83h6ux6xwl.fsf@gnu.org> <831qm07lba.fsf@gnu.org> <83o7p463zt.fsf@gnu.org> <87mt4otw1x.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1202"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Eli Zaretskii , 62004@debbugs.gnu.org To: No Wayman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Mar 07 17:01:37 2023 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 1pZZks-000054-Sb for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 07 Mar 2023 17:01:34 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pZZkR-0004FI-Hk; Tue, 07 Mar 2023 11:01:07 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pZZkM-0004F0-JS for bug-gnu-emacs@gnu.org; Tue, 07 Mar 2023 11:01:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pZZkM-0001ba-BM for bug-gnu-emacs@gnu.org; Tue, 07 Mar 2023 11:01:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pZZkM-00025t-45 for bug-gnu-emacs@gnu.org; Tue, 07 Mar 2023 11:01:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Mar 2023 16:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62004 X-GNU-PR-Package: emacs Original-Received: via spool by 62004-submit@debbugs.gnu.org id=B62004.16782048448015 (code B ref 62004); Tue, 07 Mar 2023 16:01:02 +0000 Original-Received: (at 62004) by debbugs.gnu.org; 7 Mar 2023 16:00:44 +0000 Original-Received: from localhost ([127.0.0.1]:47021 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pZZk4-00025C-0s for submit@debbugs.gnu.org; Tue, 07 Mar 2023 11:00:44 -0500 Original-Received: from mx.sdf.org ([205.166.94.24]:63667) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pZZk1-000253-E3 for 62004@debbugs.gnu.org; Tue, 07 Mar 2023 11:00:42 -0500 Original-Received: from ma.sdf.org (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.16.1/8.14.5) with ESMTPS id 327G0d8e004473 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Tue, 7 Mar 2023 16:00:40 GMT In-Reply-To: <87mt4otw1x.fsf@gmail.com> (No Wayman's message of "Tue, 07 Mar 2023 10:20:28 -0500") 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:257479 Archived-At: No Wayman writes: >>> Eli Zaretskii writes: >>> > Well, maybe we should bind the variable to be on the safe > >>> side? What >>> > if we bind it to the directory where we write that >>> > emacs-async-comp-something.el file? > > Binding default-directory makes sense. > It's just a matter of what to bind it to. > I see that `comp-run-async-workers` calls `make-temp-file' internally. > Binding default-directory to temporary-file-directory around the call > to `make-process' will prevent this error and seems like a safe bet. > >>> From: Andrea Corallo >>> Cc: iarchivedmywholelife@gmail.com, 62004@debbugs.gnu.org >>> Date: Tue, 07 Mar 2023 13:51:37 +0000 >>> >>> Maybe but the reporter says "The default-directory is dependent on >>> where >>> comp-run-async-workers happens to kick off." and I don't understand >>> if >>> that's correct why is that. >>> I'd like first to understand better the issue here. >> >> I agree that we should first have a good understanding of the >> situation. Let me know if I can help in any way. > > The call to `make-process' in `comp-run-async-workers' is executed in > the context of whatever default-directory happens to be. If > default-directory does not refer to an existing directory (as > demonstrated in the reproduction case I provided) the creation of the > subprocess will fail. > I'm not sure what more detail I can provide, so please ask a specific > question if you have any. Ah now it's clear to me, the error is not happening in the child process but in the main Emacs failing in running `make-process'. Thanks Andrea