From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Raj Krishnan 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:00:43 +0530 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000d116ab05c2e47b26" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30484"; mail-complaints-to="usenet@ciao.gmane.io" To: 48579@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 22 09:36:10 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 1lkMB7-0007ke-9D for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 22 May 2021 09:36:09 +0200 Original-Received: from localhost ([::1]:39908 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lkMB6-0007YQ-CU for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 22 May 2021 03:36:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59884) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lkMB0-0007YH-Ps for bug-gnu-emacs@gnu.org; Sat, 22 May 2021 03:36:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54943) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lkMB0-0006AI-Ir for bug-gnu-emacs@gnu.org; Sat, 22 May 2021 03:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lkMB0-0004SZ-Hh for bug-gnu-emacs@gnu.org; Sat, 22 May 2021 03:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Raj Krishnan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 May 2021 07:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 48579 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.162166894417112 (code B ref -1); Sat, 22 May 2021 07:36:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 22 May 2021 07:35:44 +0000 Original-Received: from localhost ([127.0.0.1]:38253 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkMAT-0004Rg-G6 for submit@debbugs.gnu.org; Sat, 22 May 2021 03:35:44 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:43930) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkKEE-00017I-8p for submit@debbugs.gnu.org; Sat, 22 May 2021 01:31:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42420) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lkKEE-00070o-1d for bug-gnu-emacs@gnu.org; Sat, 22 May 2021 01:31:14 -0400 Original-Received: from mail-ot1-x334.google.com ([2607:f8b0:4864:20::334]:36427) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lkKEB-0004IL-Bt for bug-gnu-emacs@gnu.org; Sat, 22 May 2021 01:31:13 -0400 Original-Received: by mail-ot1-x334.google.com with SMTP id n32-20020a9d1ea30000b02902a53d6ad4bdso20023485otn.3 for ; Fri, 21 May 2021 22:31:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=UAMjkXumv3YHQ5/u8gUGDciXWS5lQc1lk84pTi0Ox6s=; b=MhdYyR8mDAs56WsKkoDqTxQ4aDTtzto/7LYjCL1JsIkal03sQLTrUsl7cZvCQz/iNs Rr+U47jiUdVLlALAOlx4RCgJ7Rqc1+BJM/dSqQ3Ou75B0YiFxhbIQOW06wi8d/W8E+eS HZRT1UzIhMJBhrSgLmquxyy/bQFyvIn1cMb2DTtvE2YJceriarGzpA9LJtUAaPXE5VeO q6/zSLlMSNeJ8AIAQyr2JcBsTwpbGuGcOQouaZbrhtDbdTLQ1USMBDk3/TwBHsWzEW/q CMPZ39tT71xWHhewRSf5MmNzw/Ff8b9JBM0bzLGw1zi8zZV4xKzjG0lv/K8/bLUVgMWl mC2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=UAMjkXumv3YHQ5/u8gUGDciXWS5lQc1lk84pTi0Ox6s=; b=e8hBWoJB4/DLHf5bYQkWEvKwogoXsLb4l2txNURIFidlWLGH6vj77mlIelE+4nqVca 5H7UnIb95IDpA65k7k4IFML5tAGSgI/p7ltCQkBXUMAzYrj0fgT4EDH1n5GNVmZXz7tg 4MPiaZLcpIwqC8MIhgeSu1LWJ3wfHnzpehZTdE/zf5WURGD3F0Ylu5OoYH7JSklzpPEj JVtBFu8w3fC5wmWChLPVfcnv32CMp2Qy2su/WvCvOR3/wXTORhpPYukZ22V4YRGgReSu 9+JIlAcvozmiFqZScetvOxIOo6HT2ogRw+DMpbAH8KEdVHb0GYkk9Ht7fNu9lGxQT9In CD5g== X-Gm-Message-State: AOAM530PpDzmeTcEL1VWVm84i/GHBXWZ7yo7YaUUzJxwcWv+CBQn3TQ9 q93YsFP2dRQ/gdtqvvIX9g8P+Fj+JL8wVQdX/7GVgeu/doXv4A== X-Google-Smtp-Source: ABdhPJxGO/CaHeXvBtFUEa959Q/ikim4zzp2Om05r28cdNU8wSI6kj16u8JvbPCT7vuX3iMbXJUDf22mTjk4NwHZTYY= X-Received: by 2002:a05:6830:1155:: with SMTP id x21mr10835920otq.303.1621661469184; Fri, 21 May 2021 22:31:09 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::334; envelope-from=rajkrishnan1996@gmail.com; helo=mail-ot1-x334.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sat, 22 May 2021 03:35:29 -0400 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:207014 Archived-At: --000000000000d116ab05c2e47b26 Content-Type: text/plain; charset="UTF-8" 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= In GNU Emacs 28.0.50 (build 2, aarch64-apple-darwin20.4.0, NS appkit-2022.44 Version 11.3.1 (Build 20E241)) of 2021-05-16 built on localhost Repository revision: 1b8f013d179e8866819fe53b4708b57e753a08fc Repository branch: master Windowing system distributor 'Apple', version 10.3.2022 System Description: macOS 11.3.1 Configured using: 'configure --with-ns --with-modules --with-gnutls CFLAGS=-O3' Configured features: ACL GLIB GNUTLS JSON LCMS2 LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER PNG RSVG THREADS TOOLKIT_SCROLL_BARS XIM ZLIB Important settings: value of $LC_CTYPE: UTF-8 value of $LANG: en_IN.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json map text-property-search time-date subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils iso-transl tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads kqueue cocoa ns lcms2 multi-tty make-network-process emacs) Memory information: ((conses 16 50394 13010) (symbols 48 6513 1) (strings 32 18129 1897) (string-bytes 1 601636) (vectors 16 12488) (vector-slots 8 175753 14592) (floats 8 21 50) (intervals 56 206 0) (buffers 992 11)) --000000000000d116ab05c2e47b26 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Steps for reproduction:
1. Run =3Demacs -Q=3D in some d= irectory outside the user's home directory
2. Check the value of the= variable =3Ddefault-directory=3D, and verify that
=C2=A0 =C2=A0it match= es the directory you started emacs in
3. Create an emacs child process u= sing:

#+begin_src emacs_lisp
=C2=A0 (call-process
=C2=A0 =C2= =A0 (file-truename (expand-file-name invocation-name invocation-directory))=
=C2=A0 =C2=A0 nil nil nil "-Q")
#+end_src

4. In the= newly created frame, check the value of the default directory

5. Be= havior on GNU/Linux: The directory matches the value shown in (2)
=C2=A0= =C2=A0Behavior on macOS: The default directory has changed to the user'= ;s
=C2=A0 =C2=A0home directory

The behavior was spotted when we n= oticed inconsistent behavior in
[[https://github.com/minad/affe][affe.el]], which was subse= quently
reproduced using =3Demacs -Q=3D




In GNU Emacs = 28.0.50 (build 2, aarch64-apple-darwin20.4.0, NS appkit-2022.44 Version 11.= 3.1 (Build 20E241))
=C2=A0of 2021-05-16 built on localhost
Repository= revision: 1b8f013d179e8866819fe53b4708b57e753a08fc
Repository branch: m= aster
Windowing system distributor 'Apple', version 10.3.2022System Description: =C2=A0macOS 11.3.1

Configured using:
=C2=A0&= #39;configure --with-ns --with-modules --with-gnutls CFLAGS=3D-O3'
<= br>Configured features:
ACL GLIB GNUTLS JSON LCMS2 LIBXML2 MODULES NOTIF= Y KQUEUE NS PDUMPER PNG
RSVG THREADS TOOLKIT_SCROLL_BARS XIM ZLIB
Important settings:
=C2=A0 value of $LC_CTYPE: UTF-8
=C2=A0 value of= $LANG: en_IN.UTF-8
=C2=A0 locale-coding-system: utf-8-unix

Major= mode: Lisp Interaction

Minor modes in effect:
=C2=A0 tooltip-mod= e: t
=C2=A0 global-eldoc-mode: t
=C2=A0 eldoc-mode: t
=C2=A0 elect= ric-indent-mode: t
=C2=A0 mouse-wheel-mode: t
=C2=A0 tool-bar-mode: t=
=C2=A0 menu-bar-mode: t
=C2=A0 file-name-shadow-mode: t
=C2=A0 gl= obal-font-lock-mode: t
=C2=A0 font-lock-mode: t
=C2=A0 blink-cursor-m= ode: t
=C2=A0 auto-composition-mode: t
=C2=A0 auto-encryption-mode: t=
=C2=A0 auto-compression-mode: t
=C2=A0 line-number-mode: t
=C2=A0= transient-mark-mode: t

Load-path shadows:
None found.

Fea= tures:
(shadow sort mail-extr emacsbug message rmc puny dired dired-load= defs
rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail
rm= ail-loaddefs auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs = password-cache json map text-property-search time-date
subr-x seq byte-o= pt gv bytecomp byte-compile cconv mm-decode mm-bodies
mm-encode mail-par= se rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs
cl-lib sendmail r= fc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
iso-transl toolt= ip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel te= rm/ns-win ns-win ucs-normalize mule-util
term/common-win tool-bar dnd fo= ntset image regexp-opt fringe
tabulated-list replace newcomment text-mod= e elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-esha= dow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock sy= ntax font-core
term/tty-colors frame minibuffer cl-generic cham georgian= utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japane= se eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic= indian
cyrillic chinese composite charscript charprop case-table epa-ho= ok
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button<= br>loaddefs faces cus-face macroexp files window text-properties overlaysha1 md5 base64 format env code-pages mule custom widget
hashtable-prin= t-readable backquote threads kqueue cocoa ns lcms2
multi-tty make-networ= k-process emacs)

Memory information:
((conses 16 50394 13010)
= =C2=A0(symbols 48 6513 1)
=C2=A0(strings 32 18129 1897)
=C2=A0(string= -bytes 1 601636)
=C2=A0(vectors 16 12488)
=C2=A0(vector-slots 8 17575= 3 14592)
=C2=A0(floats 8 21 50)
=C2=A0(intervals 56 206 0)
=C2=A0(= buffers 992 11))
--000000000000d116ab05c2e47b26--