Subject: 29.0.50; Emacs crashes when calling start-process-shell-command xdg-open with process-connection-type set to nil

From: Ihor Radchenko <[email-masked]>
Date: Fri, 27 May 2022 14:24:55 +0800

Hi,

I am experiencing Emacs crashes/flickering on Linux with the following:

1. Minimal init.el

(require 'server)
(unless (server-running-p) (server-start))
(setenv "DISPLAY" ":0.0")
(define-key input-decode-map (kbd "C-[") [C-\[])

2. ~/.local/share/applications/emacsclient-local.desktop

[Desktop Entry]
Type=Application
Version=1.0
Name=Emacs Client
Exec=emacsclient -c %f
Icon=emacs-icon
Terminal=false
MimeType=text/css;text/english;text/html;text/plain;text/x-c;text/x-chdr;text/x-csrc;text/x-c++;text/x-c++hdr;text/x-c++src;text/x-java;text/x-makefile;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;application/pdf;inode/directory;inode/mount-point;image/png;image/tiff;

3. Executing

(let ((process-connection-type nil))
  (start-process-shell-command "1" nil "xdg-open ~/.bashrc"))

~/.bashrc is a normal bash script file

Best,
Ihor

In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, cairo version 1.16.0)
 of 2022-05-27 built on localhost
Repository revision: bb0317442b4d62108ca40cc396f5ced467c55f25
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101003
System Description: Gentoo Linux

Configured using:
 'configure --prefix=/usr --build=x86_64-pc-linux-gnu
 --host=x86_64-pc-linux-gnu --mandir=/usr/share/man
 --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc
 --localstatedir=/var/lib --datarootdir=/usr/share
 --disable-silent-rules --docdir=/usr/share/doc/emacs-29.0.9999
 --htmldir=/usr/share/doc/emacs-29.0.9999/html --libdir=/usr/lib64
 --program-suffix=-emacs-29-vcs --includedir=/usr/include/emacs-29-vcs
 --infodir=/usr/share/info/emacs-29-vcs --localstatedir=/var
 --enable-locallisppath=/etc/emacs:/usr/share/emacs/site-lisp
 --without-compress-install --without-hesiod --without-pop
 --with-file-notification=inotify --with-pdumper --enable-acl
 --with-dbus --with-modules --without-gameuser --with-libgmp
 --without-gpm --with-native-compilation --with-json --without-kerberos
 --without-kerberos5 --without-lcms2 --with-xml2 --without-mailutils
 --with-selinux --without-sqlite3 --with-gnutls --without-libsystemd
 --with-threads --with-wide-int --with-zlib --with-sound=oss --with-x
 --without-pgtk --without-ns --without-gconf --without-gsettings
 --without-toolkit-scroll-bars --with-xpm --with-xft --with-cairo
 --with-harfbuzz --without-libotf --without-m17n-flt --with-x-toolkit=no
 --with-gif --with-jpeg --with-png --with-rsvg --with-tiff
 --without-webp --with-imagemagick --with-dumping=pdumper
 'CFLAGS=-march=native -O3 -pipe' 'LDFLAGS=-Wl,-O1 -Wl,--as-needed''

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS HARFBUZZ IMAGEMAGICK JPEG
JSON LIBSELINUX LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY OLDXMENU
PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF X11 XDBE XIM XINPUT2 XPM
ZLIB

Important settings:
  value of $LC_COLLATE: C
  value of $LANG: en_US.utf8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction