From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Third Newsgroups: gmane.emacs.bugs Subject: bug#48579: 28.0.50; Spawning an emacs process using call-process results in inconsistent behavior between GNU/Linux and macOS Date: Sat, 22 May 2021 11:26:16 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6366"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 48579@debbugs.gnu.org To: Raj Krishnan Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 22 12:27:11 2021 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 1lkOqd-0001TB-4P for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 22 May 2021 12:27:11 +0200 Original-Received: from localhost ([::1]:44000 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lkOqb-0004xF-O1 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 22 May 2021 06:27:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55940) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lkOqU-0004wp-9L for bug-gnu-emacs@gnu.org; Sat, 22 May 2021 06:27:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55044) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lkOqU-0005jO-1y for bug-gnu-emacs@gnu.org; Sat, 22 May 2021 06:27:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lkOqT-00007k-Tu for bug-gnu-emacs@gnu.org; Sat, 22 May 2021 06:27:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 May 2021 10:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48579 X-GNU-PR-Package: emacs Original-Received: via spool by 48579-submit@debbugs.gnu.org id=B48579.1621679190431 (code B ref 48579); Sat, 22 May 2021 10:27:01 +0000 Original-Received: (at 48579) by debbugs.gnu.org; 22 May 2021 10:26:30 +0000 Original-Received: from localhost ([127.0.0.1]:38357 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkOpy-00006r-0a for submit@debbugs.gnu.org; Sat, 22 May 2021 06:26:30 -0400 Original-Received: from outbound.soverin.net ([116.202.65.218]:43909) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkOpt-00006Y-IH for 48579@debbugs.gnu.org; Sat, 22 May 2021 06:26:27 -0400 Original-Received: from smtp.soverin.net (unknown [10.10.3.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by outbound.soverin.net (Postfix) with ESMTPS id 3CB7B60109 for <48579@debbugs.gnu.org>; Sat, 22 May 2021 10:26:19 +0000 (UTC) Original-Received: from smtp.soverin.net (smtp.soverin.net [159.69.232.142]) by soverin.net DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1621679178; bh=3NoctDQ5tWw7Yz/6WHY6xXiy6Xhoe57wEppjCzDhBYs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Z+YyGQoHiHRpwZMnhiMYXu99cWc+F4w2ZljANlNPLSQuforNQ5siR0GgH01b6ogUR djFdw6/5+bHfxp0OmkDqhCeGUfGB3qb8IpP4QFHB3WbVru3AT0BaE/94Qy594BpzuI WaPDK9CBs2Y/C5LLjaY7MhuVVDlcTq9zxc74OT58tOTcK4lkEcC6blhstx7UGq2daU vKzHCvCp2e/fI3B+qYWBVou5RjPmP+SgrYHKLdkFyuSrrSqraKMBpQNeafDGDCkfJh 44BXFlIimnmgcwzwmc30DABgiNgChAZjbx714iITC2ZdyEOi4sWPSXvIY6FJGCphdF OSe5iklnl4Kzw== Original-Received: from alan by faroe.holly.idiocy.org with local (Exim 4.94.2) (envelope-from ) id 1lkOpk-0007KY-3L; Sat, 22 May 2021 11:26:16 +0100 Mail-Followup-To: Alan Third , Raj Krishnan , 48579@debbugs.gnu.org Content-Disposition: inline In-Reply-To: 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:207023 Archived-At: On Sat, May 22, 2021 at 11:00:43AM +0530, Raj Krishnan wrote: > Steps for reproduction: > 1. Run =emacs -Q= in some directory outside the user's home directory > 2. Check the value of the variable =default-directory=, and verify that > it matches the directory you started emacs in > 3. Create an emacs child process using: > > #+begin_src emacs_lisp > (call-process > (file-truename (expand-file-name invocation-name invocation-directory)) > nil nil nil "-Q") > #+end_src > > 4. In the newly created frame, check the value of the default directory > > 5. Behavior on GNU/Linux: The directory matches the value shown in (2) > Behavior on macOS: The default directory has changed to the user's > home directory > > The behavior was spotted when we noticed inconsistent behavior in > [[https://github.com/minad/affe][affe.el]], which was subsequently > reproduced using =emacs -Q= The NS port checks if it's connected to a TTY when it starts, and if not assumes it's being run from finder and so sets the starting directory to something useful ($HOME), instead of / or whatever it defaults to. -- Alan Third