all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#72117: Command doesn't execute correctly in eshell
@ 2024-07-14 19:33 the_wurfkreuz via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-07-15  1:01 ` Jim Porter
  0 siblings, 1 reply; 14+ messages in thread
From: the_wurfkreuz via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-07-14 19:33 UTC (permalink / raw)
  To: 72117


[-- Attachment #1.1: Type: text/plain, Size: 28993 bytes --]

First of all, i can't execute 'sudo lsof | grep delete | head -10' in
eshell. But that's not the most interesting part. I can execute the
command with 'eshell/sudo'. But after the command execution emacs will
take the whole CPU processing time if i have '(global-display-line-numbers-mode 1)'
option enabled.

Steps to reproduce:

1. emacs -Q
2. M-x 'eshell'
3. sudo lsof | grep delete | head -10
4. send SIGINT
5. (require 'em-tramp)
6. eshell/sudo lsof | grep delete | head -10
7. execute '(global-display-line-numbers-mode 1)'.
You might get CPU 100% right after the command execution.
8. eshell/sudo lsof | grep delete | head -10

Now CPU usage at 100%.

In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.41, cairo version 1.18.0) of 2024-04-23 built on archlinux
Repository revision: 326437e6c8a6497b1a38d002b1d28e74678a07aa
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12401000
System Description: Arch Linux

Configured using:
'configure --with-native-compilation=aot --with-tree-sitter --with-gif
--with-png --with-jpeg --with-rsvg --with-tiff --with-imagemagick
--with-x-toolkit=gtk3 --with-xwidgets
CPPFLAGS=-I/opt/homebrew/opt/jpeg/include
LDFLAGS=-L/opt/homebrew/opt/jpeg/lib'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ
IMAGEMAGICK JPEG LCMS2 LIBOTF LIBSYSTEMD LIBXML2 M17N_FLT MODULES
NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3
THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2
XPM XWIDGETS GTK3 ZLIB

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

Major mode: Org

Minor modes in effect:
windmove-mode: t
org-indent-mode: t
org-bullets-mode: t
pyvenv-mode: t
shackle-mode: t
popper-echo-mode: t
popper-mode: t
eshell-syntax-highlighting-global-mode: t
all-the-icons-ivy-rich-mode: t
ivy-rich-mode: t
counsel-mode: t
ivy-mode: t
override-global-mode: t
projectile-mode: t
global-fish-completion-mode: t
fish-completion-mode: t
corfu-popupinfo-mode: t
corfu-history-mode: t
corfu-echo-mode: t
global-corfu-mode: t
corfu-mode: t
yas-global-mode: t
yas-minor-mode: t
vimish-fold-global-mode: t
vimish-fold-mode: t
which-key-mode: t
dired-async-mode: t
general-override-mode: t
global-treesit-auto-mode: t
global-evil-collection-unimpaired-mode: t
evil-collection-unimpaired-mode: t
evil-org-mode: t
global-evil-surround-mode: t
evil-surround-mode: t
evil-mode: t
evil-local-mode: t
global-undo-tree-mode: t
undo-tree-mode: t
global-auto-revert-mode: t
pixel-scroll-precision-mode: t
save-place-mode: t
savehist-mode: t
electric-pair-mode: t
global-display-line-numbers-mode: t
display-line-numbers-mode: t
straight-use-package-mode: t
straight-package-neutering-mode: t
tooltip-mode: t
show-paren-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
prettify-symbols-mode: t
tab-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
minibuffer-regexp-mode: t
line-number-mode: t
auto-fill-function: #[128 \304\300\301#\207 [yas--auto-fill org-auto-fill-function :around nil apply] 5 advice]
transient-mark-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t

Load-path shadows:
/home/wurfkreuz/.emacs.d/straight/build/transient/transient hides /home/wurfkreuz/.source/emacs/lisp/transient
/home/wurfkreuz/.emacs.d/straight/build/bind-key/bind-key hides /home/wurfkreuz/.source/emacs/lisp/bind-key
/home/wurfkreuz/.emacs.d/straight/build/use-package/use-package hides /home/wurfkreuz/.source/emacs/lisp/use-package/use-package
/home/wurfkreuz/.emacs.d/straight/build/use-package/use-package-lint hides /home/wurfkreuz/.source/emacs/lisp/use-package/use-package-lint
/home/wurfkreuz/.emacs.d/straight/build/use-package/use-package-jump hides /home/wurfkreuz/.source/emacs/lisp/use-package/use-package-jump
/home/wurfkreuz/.emacs.d/straight/build/use-package/use-package-ensure hides /home/wurfkreuz/.source/emacs/lisp/use-package/use-package-ensure
/home/wurfkreuz/.emacs.d/straight/build/use-package/use-package-diminish hides /home/wurfkreuz/.source/emacs/lisp/use-package/use-package-diminish
/home/wurfkreuz/.emacs.d/straight/build/use-package/use-package-delight hides /home/wurfkreuz/.source/emacs/lisp/use-package/use-package-delight
/home/wurfkreuz/.emacs.d/straight/build/use-package/use-package-core hides /home/wurfkreuz/.source/emacs/lisp/use-package/use-package-core
/home/wurfkreuz/.emacs.d/straight/build/use-package/use-package-bind-key hides /home/wurfkreuz/.source/emacs/lisp/use-package/use-package-bind-key
/home/wurfkreuz/.emacs.d/straight/build/org/ox-publish hides /home/wurfkreuz/.source/emacs/lisp/org/ox-publish
/home/wurfkreuz/.emacs.d/straight/build/org/ox-org hides /home/wurfkreuz/.source/emacs/lisp/org/ox-org
/home/wurfkreuz/.emacs.d/straight/build/org/ox-odt hides /home/wurfkreuz/.source/emacs/lisp/org/ox-odt
/home/wurfkreuz/.emacs.d/straight/build/org/ox-md hides /home/wurfkreuz/.source/emacs/lisp/org/ox-md
/home/wurfkreuz/.emacs.d/straight/build/org/ox-man hides /home/wurfkreuz/.source/emacs/lisp/org/ox-man
/home/wurfkreuz/.emacs.d/straight/build/org/ox-latex hides /home/wurfkreuz/.source/emacs/lisp/org/ox-latex
/home/wurfkreuz/.emacs.d/straight/build/org/ox-koma-letter hides /home/wurfkreuz/.source/emacs/lisp/org/ox-koma-letter
/home/wurfkreuz/.emacs.d/straight/build/org/ox-icalendar hides /home/wurfkreuz/.source/emacs/lisp/org/ox-icalendar
/home/wurfkreuz/.emacs.d/straight/build/org/ox-html hides /home/wurfkreuz/.source/emacs/lisp/org/ox-html
/home/wurfkreuz/.emacs.d/straight/build/org/ox-beamer hides /home/wurfkreuz/.source/emacs/lisp/org/ox-beamer
/home/wurfkreuz/.emacs.d/straight/build/org/ox-ascii hides /home/wurfkreuz/.source/emacs/lisp/org/ox-ascii
/home/wurfkreuz/.emacs.d/straight/build/org/org hides /home/wurfkreuz/.source/emacs/lisp/org/org
/home/wurfkreuz/.emacs.d/straight/build/org/org-timer hides /home/wurfkreuz/.source/emacs/lisp/org/org-timer
/home/wurfkreuz/.emacs.d/straight/build/org/org-tempo hides /home/wurfkreuz/.source/emacs/lisp/org/org-tempo
/home/wurfkreuz/.emacs.d/straight/build/org/org-table hides /home/wurfkreuz/.source/emacs/lisp/org/org-table
/home/wurfkreuz/.emacs.d/straight/build/org/org-src hides /home/wurfkreuz/.source/emacs/lisp/org/org-src
/home/wurfkreuz/.emacs.d/straight/build/org/org-refile hides /home/wurfkreuz/.source/emacs/lisp/org/org-refile
/home/wurfkreuz/.emacs.d/straight/build/org/org-protocol hides /home/wurfkreuz/.source/emacs/lisp/org/org-protocol
/home/wurfkreuz/.emacs.d/straight/build/org/org-plot hides /home/wurfkreuz/.source/emacs/lisp/org/org-plot
/home/wurfkreuz/.emacs.d/straight/build/org/org-persist hides /home/wurfkreuz/.source/emacs/lisp/org/org-persist
/home/wurfkreuz/.emacs.d/straight/build/org/org-pcomplete hides /home/wurfkreuz/.source/emacs/lisp/org/org-pcomplete
/home/wurfkreuz/.emacs.d/straight/build/org/org-num hides /home/wurfkreuz/.source/emacs/lisp/org/org-num
/home/wurfkreuz/.emacs.d/straight/build/org/org-mouse hides /home/wurfkreuz/.source/emacs/lisp/org/org-mouse
/home/wurfkreuz/.emacs.d/straight/build/org/org-mobile hides /home/wurfkreuz/.source/emacs/lisp/org/org-mobile
/home/wurfkreuz/.emacs.d/straight/build/org/org-macs hides /home/wurfkreuz/.source/emacs/lisp/org/org-macs
/home/wurfkreuz/.emacs.d/straight/build/org/org-loaddefs hides /home/wurfkreuz/.source/emacs/lisp/org/org-loaddefs
/home/wurfkreuz/.emacs.d/straight/build/org/org-list hides /home/wurfkreuz/.source/emacs/lisp/org/org-list
/home/wurfkreuz/.emacs.d/straight/build/org/org-lint hides /home/wurfkreuz/.source/emacs/lisp/org/org-lint
/home/wurfkreuz/.emacs.d/straight/build/org/org-keys hides /home/wurfkreuz/.source/emacs/lisp/org/org-keys
/home/wurfkreuz/.emacs.d/straight/build/org/org-inlinetask hides /home/wurfkreuz/.source/emacs/lisp/org/org-inlinetask
/home/wurfkreuz/.emacs.d/straight/build/org/org-indent hides /home/wurfkreuz/.source/emacs/lisp/org/org-indent
/home/wurfkreuz/.emacs.d/straight/build/org/org-id hides /home/wurfkreuz/.source/emacs/lisp/org/org-id
/home/wurfkreuz/.emacs.d/straight/build/org/org-habit hides /home/wurfkreuz/.source/emacs/lisp/org/org-habit
/home/wurfkreuz/.emacs.d/straight/build/org/org-goto hides /home/wurfkreuz/.source/emacs/lisp/org/org-goto
/home/wurfkreuz/.emacs.d/straight/build/org/org-footnote hides /home/wurfkreuz/.source/emacs/lisp/org/org-footnote
/home/wurfkreuz/.emacs.d/straight/build/org/org-fold hides /home/wurfkreuz/.source/emacs/lisp/org/org-fold
/home/wurfkreuz/.emacs.d/straight/build/org/org-fold-core hides /home/wurfkreuz/.source/emacs/lisp/org/org-fold-core
/home/wurfkreuz/.emacs.d/straight/build/org/org-feed hides /home/wurfkreuz/.source/emacs/lisp/org/org-feed
/home/wurfkreuz/.emacs.d/straight/build/org/org-faces hides /home/wurfkreuz/.source/emacs/lisp/org/org-faces
/home/wurfkreuz/.emacs.d/straight/build/org/org-entities hides /home/wurfkreuz/.source/emacs/lisp/org/org-entities
/home/wurfkreuz/.emacs.d/straight/build/org/org-duration hides /home/wurfkreuz/.source/emacs/lisp/org/org-duration
/home/wurfkreuz/.emacs.d/straight/build/org/org-datetree hides /home/wurfkreuz/.source/emacs/lisp/org/org-datetree
/home/wurfkreuz/.emacs.d/straight/build/org/org-cycle hides /home/wurfkreuz/.source/emacs/lisp/org/org-cycle
/home/wurfkreuz/.emacs.d/straight/build/org/org-ctags hides /home/wurfkreuz/.source/emacs/lisp/org/org-ctags
/home/wurfkreuz/.emacs.d/straight/build/org/org-crypt hides /home/wurfkreuz/.source/emacs/lisp/org/org-crypt
/home/wurfkreuz/.emacs.d/straight/build/org/org-compat hides /home/wurfkreuz/.source/emacs/lisp/org/org-compat
/home/wurfkreuz/.emacs.d/straight/build/org/org-colview hides /home/wurfkreuz/.source/emacs/lisp/org/org-colview
/home/wurfkreuz/.emacs.d/straight/build/org/org-clock hides /home/wurfkreuz/.source/emacs/lisp/org/org-clock
/home/wurfkreuz/.emacs.d/straight/build/org/org-capture hides /home/wurfkreuz/.source/emacs/lisp/org/org-capture
/home/wurfkreuz/.emacs.d/straight/build/org/org-attach hides /home/wurfkreuz/.source/emacs/lisp/org/org-attach
/home/wurfkreuz/.emacs.d/straight/build/org/org-attach-git hides /home/wurfkreuz/.source/emacs/lisp/org/org-attach-git
/home/wurfkreuz/.emacs.d/straight/build/org/org-archive hides /home/wurfkreuz/.source/emacs/lisp/org/org-archive
/home/wurfkreuz/.emacs.d/straight/build/org/org-agenda hides /home/wurfkreuz/.source/emacs/lisp/org/org-agenda
/home/wurfkreuz/.emacs.d/straight/build/org/ol-w3m hides /home/wurfkreuz/.source/emacs/lisp/org/ol-w3m
/home/wurfkreuz/.emacs.d/straight/build/org/ol-rmail hides /home/wurfkreuz/.source/emacs/lisp/org/ol-rmail
/home/wurfkreuz/.emacs.d/straight/build/org/ol-mhe hides /home/wurfkreuz/.source/emacs/lisp/org/ol-mhe
/home/wurfkreuz/.emacs.d/straight/build/org/ol-man hides /home/wurfkreuz/.source/emacs/lisp/org/ol-man
/home/wurfkreuz/.emacs.d/straight/build/org/ol-irc hides /home/wurfkreuz/.source/emacs/lisp/org/ol-irc
/home/wurfkreuz/.emacs.d/straight/build/org/ol-info hides /home/wurfkreuz/.source/emacs/lisp/org/ol-info
/home/wurfkreuz/.emacs.d/straight/build/org/ol-gnus hides /home/wurfkreuz/.source/emacs/lisp/org/ol-gnus
/home/wurfkreuz/.emacs.d/straight/build/org/ol-eww hides /home/wurfkreuz/.source/emacs/lisp/org/ol-eww
/home/wurfkreuz/.emacs.d/straight/build/org/ol-eshell hides /home/wurfkreuz/.source/emacs/lisp/org/ol-eshell
/home/wurfkreuz/.emacs.d/straight/build/org/ol-doi hides /home/wurfkreuz/.source/emacs/lisp/org/ol-doi
/home/wurfkreuz/.emacs.d/straight/build/org/ol-docview hides /home/wurfkreuz/.source/emacs/lisp/org/ol-docview
/home/wurfkreuz/.emacs.d/straight/build/org/ol-bibtex hides /home/wurfkreuz/.source/emacs/lisp/org/ol-bibtex
/home/wurfkreuz/.emacs.d/straight/build/org/ol-bbdb hides /home/wurfkreuz/.source/emacs/lisp/org/ol-bbdb
/home/wurfkreuz/.emacs.d/straight/build/org/oc-natbib hides /home/wurfkreuz/.source/emacs/lisp/org/oc-natbib
/home/wurfkreuz/.emacs.d/straight/build/org/oc-csl hides /home/wurfkreuz/.source/emacs/lisp/org/oc-csl
/home/wurfkreuz/.emacs.d/straight/build/org/oc-bibtex hides /home/wurfkreuz/.source/emacs/lisp/org/oc-bibtex
/home/wurfkreuz/.emacs.d/straight/build/org/oc-biblatex hides /home/wurfkreuz/.source/emacs/lisp/org/oc-biblatex
/home/wurfkreuz/.emacs.d/straight/build/org/oc-basic hides /home/wurfkreuz/.source/emacs/lisp/org/oc-basic
/home/wurfkreuz/.emacs.d/straight/build/org/ob hides /home/wurfkreuz/.source/emacs/lisp/org/ob
/home/wurfkreuz/.emacs.d/straight/build/org/ob-tangle hides /home/wurfkreuz/.source/emacs/lisp/org/ob-tangle
/home/wurfkreuz/.emacs.d/straight/build/org/ob-table hides /home/wurfkreuz/.source/emacs/lisp/org/ob-table
/home/wurfkreuz/.emacs.d/straight/build/org/ob-sqlite hides /home/wurfkreuz/.source/emacs/lisp/org/ob-sqlite
/home/wurfkreuz/.emacs.d/straight/build/org/ob-sql hides /home/wurfkreuz/.source/emacs/lisp/org/ob-sql
/home/wurfkreuz/.emacs.d/straight/build/org/ob-shell hides /home/wurfkreuz/.source/emacs/lisp/org/ob-shell
/home/wurfkreuz/.emacs.d/straight/build/org/ob-sed hides /home/wurfkreuz/.source/emacs/lisp/org/ob-sed
/home/wurfkreuz/.emacs.d/straight/build/org/ob-screen hides /home/wurfkreuz/.source/emacs/lisp/org/ob-screen
/home/wurfkreuz/.emacs.d/straight/build/org/ob-scheme hides /home/wurfkreuz/.source/emacs/lisp/org/ob-scheme
/home/wurfkreuz/.emacs.d/straight/build/org/ob-sass hides /home/wurfkreuz/.source/emacs/lisp/org/ob-sass
/home/wurfkreuz/.emacs.d/straight/build/org/ob-ruby hides /home/wurfkreuz/.source/emacs/lisp/org/ob-ruby
/home/wurfkreuz/.emacs.d/straight/build/org/ob-ref hides /home/wurfkreuz/.source/emacs/lisp/org/ob-ref
/home/wurfkreuz/.emacs.d/straight/build/org/ob-python hides /home/wurfkreuz/.source/emacs/lisp/org/ob-python
/home/wurfkreuz/.emacs.d/straight/build/org/ob-processing hides /home/wurfkreuz/.source/emacs/lisp/org/ob-processing
/home/wurfkreuz/.emacs.d/straight/build/org/ob-plantuml hides /home/wurfkreuz/.source/emacs/lisp/org/ob-plantuml
/home/wurfkreuz/.emacs.d/straight/build/org/ob-perl hides /home/wurfkreuz/.source/emacs/lisp/org/ob-perl
/home/wurfkreuz/.emacs.d/straight/build/org/ob-org hides /home/wurfkreuz/.source/emacs/lisp/org/ob-org
/home/wurfkreuz/.emacs.d/straight/build/org/ob-octave hides /home/wurfkreuz/.source/emacs/lisp/org/ob-octave
/home/wurfkreuz/.emacs.d/straight/build/org/ob-ocaml hides /home/wurfkreuz/.source/emacs/lisp/org/ob-ocaml
/home/wurfkreuz/.emacs.d/straight/build/org/ob-maxima hides /home/wurfkreuz/.source/emacs/lisp/org/ob-maxima
/home/wurfkreuz/.emacs.d/straight/build/org/ob-matlab hides /home/wurfkreuz/.source/emacs/lisp/org/ob-matlab
/home/wurfkreuz/.emacs.d/straight/build/org/ob-makefile hides /home/wurfkreuz/.source/emacs/lisp/org/ob-makefile
/home/wurfkreuz/.emacs.d/straight/build/org/ob-lua hides /home/wurfkreuz/.source/emacs/lisp/org/ob-lua
/home/wurfkreuz/.emacs.d/straight/build/org/ob-lob hides /home/wurfkreuz/.source/emacs/lisp/org/ob-lob
/home/wurfkreuz/.emacs.d/straight/build/org/ob-lisp hides /home/wurfkreuz/.source/emacs/lisp/org/ob-lisp
/home/wurfkreuz/.emacs.d/straight/build/org/ob-lilypond hides /home/wurfkreuz/.source/emacs/lisp/org/ob-lilypond
/home/wurfkreuz/.emacs.d/straight/build/org/ob-latex hides /home/wurfkreuz/.source/emacs/lisp/org/ob-latex
/home/wurfkreuz/.emacs.d/straight/build/org/ob-julia hides /home/wurfkreuz/.source/emacs/lisp/org/ob-julia
/home/wurfkreuz/.emacs.d/straight/build/org/ob-js hides /home/wurfkreuz/.source/emacs/lisp/org/ob-js
/home/wurfkreuz/.emacs.d/straight/build/org/ob-java hides /home/wurfkreuz/.source/emacs/lisp/org/ob-java
/home/wurfkreuz/.emacs.d/straight/build/org/ob-haskell hides /home/wurfkreuz/.source/emacs/lisp/org/ob-haskell
/home/wurfkreuz/.emacs.d/straight/build/org/ob-groovy hides /home/wurfkreuz/.source/emacs/lisp/org/ob-groovy
/home/wurfkreuz/.emacs.d/straight/build/org/ob-gnuplot hides /home/wurfkreuz/.source/emacs/lisp/org/ob-gnuplot
/home/wurfkreuz/.emacs.d/straight/build/org/ob-fortran hides /home/wurfkreuz/.source/emacs/lisp/org/ob-fortran
/home/wurfkreuz/.emacs.d/straight/build/org/ob-forth hides /home/wurfkreuz/.source/emacs/lisp/org/ob-forth
/home/wurfkreuz/.emacs.d/straight/build/org/ob-exp hides /home/wurfkreuz/.source/emacs/lisp/org/ob-exp
/home/wurfkreuz/.emacs.d/straight/build/org/ob-eval hides /home/wurfkreuz/.source/emacs/lisp/org/ob-eval
/home/wurfkreuz/.emacs.d/straight/build/org/ob-eshell hides /home/wurfkreuz/.source/emacs/lisp/org/ob-eshell
/home/wurfkreuz/.emacs.d/straight/build/org/ob-emacs-lisp hides /home/wurfkreuz/.source/emacs/lisp/org/ob-emacs-lisp
/home/wurfkreuz/.emacs.d/straight/build/org/ob-dot hides /home/wurfkreuz/.source/emacs/lisp/org/ob-dot
/home/wurfkreuz/.emacs.d/straight/build/org/ob-ditaa hides /home/wurfkreuz/.source/emacs/lisp/org/ob-ditaa
/home/wurfkreuz/.emacs.d/straight/build/org/ob-css hides /home/wurfkreuz/.source/emacs/lisp/org/ob-css
/home/wurfkreuz/.emacs.d/straight/build/org/ob-core hides /home/wurfkreuz/.source/emacs/lisp/org/ob-core
/home/wurfkreuz/.emacs.d/straight/build/org/ob-comint hides /home/wurfkreuz/.source/emacs/lisp/org/ob-comint
/home/wurfkreuz/.emacs.d/straight/build/org/ob-clojure hides /home/wurfkreuz/.source/emacs/lisp/org/ob-clojure
/home/wurfkreuz/.emacs.d/straight/build/org/ob-calc hides /home/wurfkreuz/.source/emacs/lisp/org/ob-calc
/home/wurfkreuz/.emacs.d/straight/build/org/ob-awk hides /home/wurfkreuz/.source/emacs/lisp/org/ob-awk
/home/wurfkreuz/.emacs.d/straight/build/org/ob-R hides /home/wurfkreuz/.source/emacs/lisp/org/ob-R
/home/wurfkreuz/.emacs.d/straight/build/org/ob-C hides /home/wurfkreuz/.source/emacs/lisp/org/ob-C
/home/wurfkreuz/.emacs.d/straight/build/org/ol hides /home/wurfkreuz/.source/emacs/lisp/org/ol
/home/wurfkreuz/.emacs.d/straight/build/org/oc hides /home/wurfkreuz/.source/emacs/lisp/org/oc
/home/wurfkreuz/.emacs.d/straight/build/org/org-element hides /home/wurfkreuz/.source/emacs/lisp/org/org-element
/home/wurfkreuz/.emacs.d/straight/build/org/org-macro hides /home/wurfkreuz/.source/emacs/lisp/org/org-macro
/home/wurfkreuz/.emacs.d/straight/build/org/ox-texinfo hides /home/wurfkreuz/.source/emacs/lisp/org/ox-texinfo
/home/wurfkreuz/.emacs.d/straight/build/org/ox hides /home/wurfkreuz/.source/emacs/lisp/org/ox
/home/wurfkreuz/.emacs.d/straight/build/org/org-version hides /home/wurfkreuz/.source/emacs/lisp/org/org-version
/home/wurfkreuz/.emacs.d/straight/build/map/map hides /home/wurfkreuz/.source/emacs/lisp/emacs-lisp/map
/home/wurfkreuz/.emacs.d/straight/build/compat/compat hides /home/wurfkreuz/.source/emacs/lisp/emacs-lisp/compat
/home/wurfkreuz/.emacs.d/straight/build/seq/seq hides /home/wurfkreuz/.source/emacs/lisp/emacs-lisp/seq
/home/wurfkreuz/.emacs.d/straight/build/eldoc/eldoc hides /home/wurfkreuz/.source/emacs/lisp/emacs-lisp/eldoc

Features:
(shadow sort mail-extr emacsbug ido windmove cc-awk lsp-zig lsp-yang
lsp-yaml lsp-xml lsp-wgsl lsp-volar lsp-vimscript lsp-vhdl lsp-vetur
lsp-html lsp-verilog lsp-vala lsp-v lsp-typeprof lsp-ttcn3 lsp-trunk
lsp-toml lsp-tilt lsp-tex lsp-terraform lsp-svelte lsp-steep lsp-sqls
lsp-sql lsp-sorbet lsp-solidity lsp-solargraph lsp-semgrep lsp-rust
lsp-ruff-lsp lsp-ruby-syntax-tree lsp-ruby-lsp lsp-rubocop lsp-roslyn
lsp-rf lsp-remark lsp-racket lsp-r lsp-qml lsp-pylsp lsp-pyls lsp-pwsh
lsp-purescript lsp-pls lsp-php lsp-perlnavigator lsp-perl lsp-openscad
lsp-ocaml lsp-nushell lsp-nix lsp-nim lsp-nginx lsp-move lsp-mojo
lsp-mint lsp-meson lsp-mdx lsp-marksman lsp-markdown lsp-magik lsp-lua
lsp-lisp lsp-kotlin lsp-json lsp-jq lsp-javascript lsp-idris lsp-haxe
lsp-hack lsp-groovy lsp-graphql lsp-golangci-lint lsp-glsl lsp-gleam
lsp-gdscript lsp-fsharp lsp-fortran lsp-eslint lsp-erlang lsp-emmet
lsp-elm lsp-elixir lsp-earthly lsp-dockerfile lsp-dhall lsp-d lsp-cypher
lsp-cucumber lsp-css lsp-csharp lsp-crystal lsp-credo lsp-cobol
lsp-cmake lsp-clojure lsp-clangd lsp-bufls lsp-go lsp-completion
lsp-beancount lsp-bash lsp-awk lsp-autotools lsp-astro lsp-asm
lsp-ansible lsp-angular lsp-ada lsp-semantic-tokens lsp-actionscript
python flymake-shellcheck crontab-mode js c-ts-common cc-mode cc-fonts
cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine image-file
image-converter org-indent toc-org em-unix em-term em-script em-pred
em-ls em-hist em-glob em-extpipe em-basic em-banner toc-org-autoloads
org-bullets org-bullets-autoloads org-tempo tempo org-drill persist
org-agenda org-drill-autoloads persist-autoloads org-download org-attach
org-download-autoloads lsp-ui-autoloads lsp-pyright lsp-mode
lsp-protocol tree-widget network-stream markdown-mode ht ewoc
lsp-pyright-autoloads lsp-mode-autoloads eldoc-autoloads
markdown-mode-autoloads ht-autoloads ansible ansible-autoloads
haskell-mode haskell-cabal haskell-utils haskell-font-lock
haskell-indentation haskell-string haskell-sort-imports haskell-lexeme
haskell-align-imports haskell-complete-module haskell-ghc-support
flymake-proc dabbrev haskell-customize haskell-mode-autoloads
dockerfile-mode dockerfile-mode-autoloads terraform-mode hcl-mode
terraform-mode-autoloads hcl-mode-autoloads lua-mode lua-mode-autoloads
go-mode find-file ffap etags fileloop go-mode-autoloads raku-mode
raku-repl raku-imenu raku-indent raku-font-lock raku-detect
raku-mode-autoloads flymake-shellcheck-autoloads flymake-hadolint
flymake flymake-hadolint-autoloads pyvenv evil-collection-eshell eshell
pyvenv-autoloads shackle shackle-autoloads popper-echo popper
popper-autoloads vertico-posframe vertico-multiform vertico posframe
vertico-posframe-autoloads vertico-autoloads posframe-autoloads
transpose-frame transpose-frame-autoloads evil-terminal-cursor-changer
evil-terminal-cursor-changer-autoloads em-tramp
eshell-syntax-highlighting em-prompt em-alias
eshell-syntax-highlighting-autoloads hydra lv hydra-autoloads
lv-autoloads helpful cc-langs cc-vars cc-defs trace cl-print edebug
debug backtrace info-look help-fns radix-tree elisp-refs
helpful-autoloads elisp-refs-autoloads fzf fzf-autoloads systemd
conf-mode systemd-autoloads emacs-crontab-mode-autoloads with-editor
server with-editor-autoloads all-the-icons-ivy-rich ivy-rich counsel
swiper evil-collection-ivy ivy delsel ivy-faces ivy-overlay colir
all-the-icons-ivy-rich-autoloads ivy-rich-autoloads counsel-autoloads
swiper-autoloads ivy-autoloads embark-autoloads use-package-bind-key
bind-key mentor url-scgi mentor-rpc mentor-files mentor-data xml-rpc
url-http url-auth url-gw nsm evil-collection-term term disp-table ehelp
mentor-autoloads url-scgi-autoloads xml-rpc-autoloads projectile
projectile-autoloads cider-autoloads cider package url-handlers tramp-sh
cider-debug cider-browse-ns cider-mode cider-xref-backend cider-find
cider-inspector cider-completion cider-profile cider-eval cider-jar
arc-mode archive-mode cider-repl-history pulse cider-repl cider-resolve
cider-test cider-overlays cider-stacktrace cider-doc cider-browse-spec
cider-clojuredocs cider-eldoc cider-docstring cider-client cider-common
xref project cider-completion-context cider-connection cider-popup
sesman-browser nrepl-client cider-util color sesman nrepl-dict spinner
clojure-mode lisp-mnt align imenu parseedn parseclj-parser parseclj-lex
parseclj-alist sesman-autoloads spinner-autoloads parseedn-autoloads
map-autoloads parseclj-autoloads clojure-mode-autoloads zoxide-autoloads
paredit paredit-autoloads sudo-edit sudo-edit-autoloads
exec-path-from-shell exec-path-from-shell-autoloads fish-completion
em-cmpl em-dirs esh-mode esh-var esh-cmd esh-ext esh-opt esh-proc esh-io
esh-arg esh-module esh-groups esh-util fish-completion-autoloads cape
cape-autoloads corfu-popupinfo corfu-history corfu-echo corfu
corfu-autoloads orderless orderless-autoloads yasnippet
yasnippet-autoloads vimish-fold f vimish-fold-autoloads f-autoloads
evil-collection-docker docker docker-context docker-volume
docker-network docker-image docker-container docker-faces docker-core
docker-compose docker-process docker-utils tablist tablist-filter
semantic/wisent/comp semantic/wisent semantic/wisent/wisent
semantic/util-modes semantic/util semantic semantic/tag semantic/lex
semantic/fw mode-local cedet docker-group dash aio s docker-autoloads
tablist-autoloads dash-autoloads aio-autoloads circe lui-irc-colors irc
lcs lui-logging lui-format lui tracking shorten flyspell ispell
circe-compat circe-autoloads xterm-color xterm-color-autoloads rg vc
rg-info-hack rg-menu rg-ibuffer rg-result wgrep-rg wgrep rg-history
rg-header ibuf-ext evil-collection-ibuffer ibuffer ibuffer-loaddefs grep
compile cus-edit pp cus-load rg-autoloads wgrep-autoloads transient
compat transient-autoloads which-key which-key-autoloads dired-async
dired-aux async async-autoloads avy avy-autoloads daemons tramp trampver
tramp-integration files-x tramp-message tramp-compat shell
tramp-loaddefs daemons-autoloads compat-autoloads seq-autoloads
s-autoloads general general-autoloads clojure-ts-mode
clojure-ts-mode-autoloads treesit-auto treesit-auto-autoloads
all-the-icons-dired all-the-icons-dired-autoloads all-the-icons
all-the-icons-faces data-material data-weathericons data-octicons
data-fileicons data-faicons data-alltheicons all-the-icons-autoloads
use-package-ensure rose-pine-theme evil-collection-unimpaired
evil-collection-minibuffer evil-collection-org evil-collection-dired
evil-collection annalist evil-collection-autoloads annalist-autoloads
evil-org-agenda evil-org evil-org-autoloads evil-surround
evil-surround-autoloads evil evil-integration evil-maps evil-commands
evil-digraphs pcase reveal evil-jumps evil-command-window evil-types
evil-search evil-ex evil-macros evil-repeat evil-states evil-core advice
evil-common rect evil-vars edmacro kmacro evil-autoloads
goto-chg-autoloads undo-tree diff queue undo-tree-autoloads
queue-autoloads finder-inf use-package-core diary-lib diary-loaddefs
midnight autorevert pixel-scroll cua-base saveplace desktop frameset
savehist comp comp-cstr warnings comp-run comp-common elec-pair
display-line-numbers vc-git diff-mode track-changes easy-mmode
vc-dispatcher oc-basic org-element org-persist org-id org-refile
org-element-ast inline avl-tree generator ol-eww eww xdg url-queue
mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-art mm-uu
mml2015 mm-view mml-smime smime gnutls dig gnus-sum shr pixel-fill
kinsoku url-file svg dom gnus-group gnus-undo gnus-start gnus-dbus dbus
xml gnus-cloud nnimap nnmail browse-url url url-proxy url-privacy
url-expand url-methods url-history url-cookie generate-lisp-file
url-domsuf url-util url-parse auth-source eieio eieio-core json map
byte-opt url-vars mail-source utf7 nnoo parse-time gnus-spec gnus-int
gnus-range message sendmail mailcap yank-media puny rfc822 mml mml-sec
password-cache epa derived epg rfc6068 epg-config mm-decode mm-bodies
mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev
gmm-utils mailheader gnus-win gnus nnheader gnus-util
text-property-search mail-utils range mm-util mail-prsvr wid-edit
ol-docview doc-view filenotify jka-compr image-mode exif dired
dired-loaddefs ol-bibtex bibtex iso8601 ol-bbdb ol-w3m ol-doi
org-link-doi org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro
org-src sh-script smie treesit executable ob-comint org-pcomplete
pcomplete comint ansi-osc ansi-color ring org-list org-footnote
org-faces org-entities time-date noutline outline icons ob-emacs-lisp
ob-core ob-eval org-cycle org-table ol rx org-fold org-fold-core
org-keys oc org-loaddefs thingatpt find-func cal-menu calendar
cal-loaddefs org-version org-compat org-macs format-spec
use-package-autoloads info bind-key-autoloads straight-autoloads cl-seq
cl-extra help-mode straight subr-x cl-macs gv cl-loaddefs cl-lib
bytecomp byte-compile rmc iso-transl tooltip cconv eldoc paren electric
uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/x-win x-win term/common-win x-dnd touch-screen tool-bar dnd fontset
image regexp-opt fringe tabulated-list replace newcomment text-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 nadvice seq simple cl-generic
indonesian philippine 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 emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads xwidget-internal dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-setting
cairo gtk x-toolkit xinput2 x multi-tty move-toolbar
make-network-process native-compile emacs)

Memory information:
((conses 16 2050046 1227782) (symbols 48 77508 109) (strings 32 384839 31305)
(string-bytes 1 11146626) (vectors 16 138734) (vector-slots 8 2475924 266182)
(floats 8 1375 6543) (intervals 56 179458 5628) (buffers 992 38))

[-- Attachment #1.2: Type: text/html, Size: 39332 bytes --]

[-- Attachment #2: image_2024-07-14_22-03-00.png --]
[-- Type: image/png, Size: 138951 bytes --]

[-- Attachment #3: image_2024-07-14_22-29-50.png --]
[-- Type: image/png, Size: 22359 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#72117: Command doesn't execute correctly in eshell
  2024-07-14 19:33 bug#72117: Command doesn't execute correctly in eshell the_wurfkreuz via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-07-15  1:01 ` Jim Porter
  2024-07-16  3:09   ` Jim Porter
  2024-07-27  5:18   ` Jim Porter
  0 siblings, 2 replies; 14+ messages in thread
From: Jim Porter @ 2024-07-15  1:01 UTC (permalink / raw)
  To: the_wurfkreuz, 72117

[-- Attachment #1: Type: text/plain, Size: 957 bytes --]

On 7/14/2024 12:33 PM, the_wurfkreuz via Bug reports for GNU Emacs, the 
Swiss army knife of text editors wrote:
> First of all, i can't execute 'sudo lsof | grep delete | head -10' in
> eshell.

'sudo -S' should help here: it'll output the sudo password prompt on 
stderr so that Eshell can see it and handle password entry. (You should 
be able to enter your password anyway, but without the -S it would just 
be echoed to the screen.)

  But that's not the most interesting part. I can execute the
> command with 'eshell/sudo'. But after the command execution emacs will
> take the whole CPU processing time if i have 
> '(global-display-line-numbers-mode 1)'
> option enabled.

I can't reproduce this particular issue, but I can reproduce *an* issue. 
It seems to be due to "head -10" exiting early (as it should), which 
results in a broken pipe. However, Eshell's broken pipe handling wasn't 
properly cleaning up the process ("grep" in this example).

[-- Attachment #2: 0001-Use-kill-process-as-a-fallback-when-a-pipe-gets-brok.patch --]
[-- Type: text/plain, Size: 1715 bytes --]

From cc188c56e0b4313e55af60683f2d1cf9c7f00e1b Mon Sep 17 00:00:00 2001
From: Jim Porter <jporterbugs@gmail.com>
Date: Sun, 14 Jul 2024 16:51:43 -0700
Subject: [PATCH] Use 'kill-process' as a fallback when a pipe gets broken in
 Eshell

This is better than 'delete-process' since it will ensure that any
stderr pipe-processes get stopped as well (bug#72117).

* lisp/eshell/esh-proc.el (eshell-insertion-filter): Use 'kill-process'
instead of 'delete-process'.
---
 lisp/eshell/esh-proc.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el
index 0dcdf3bb76c..cb57bb305cc 100644
--- a/lisp/eshell/esh-proc.el
+++ b/lisp/eshell/esh-proc.el
@@ -519,7 +519,7 @@ eshell-insertion-filter
                   ;; here.  However, remote processes don't currently
                   ;; support that, and not all systems have SIGPIPE in
                   ;; the first place (e.g. MS Windows).  In these
-                  ;; cases, just delete the process; this is
+                  ;; cases, just kill the process; this is
                   ;; reasonably close to the right behavior, since the
                   ;; default action for SIGPIPE is to terminate the
                   ;; process.  For use cases where SIGPIPE is truly
@@ -529,7 +529,7 @@ eshell-insertion-filter
                   (eshell-pipe-broken
                    (if (or (process-get proc 'remote-pid)
                            (eq system-type 'windows-nt))
-                       (delete-process proc)
+                       (kill-process proc)
                      (signal-process proc 'SIGPIPE))))))
                 (process-put proc :eshell-busy nil))))))
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* bug#72117: Command doesn't execute correctly in eshell
  2024-07-15  1:01 ` Jim Porter
@ 2024-07-16  3:09   ` Jim Porter
       [not found]     ` <uDv8zx2ccT4dsHYBueowwgc6Hjuz4gs3wLRNNOXllaD4ifNUqW2-7eEYYJDjsG5VzBWGHQGoIJ1aFnbQxMLoacZR71w8v11rIb7GTfhQuus=@proton.me>
  2024-07-27  5:18   ` Jim Porter
  1 sibling, 1 reply; 14+ messages in thread
From: Jim Porter @ 2024-07-16  3:09 UTC (permalink / raw)
  To: the_wurfkreuz, 72117

[-- Attachment #1: Type: text/plain, Size: 1113 bytes --]

On 7/14/2024 6:01 PM, Jim Porter wrote:
> On 7/14/2024 12:33 PM, the_wurfkreuz via Bug reports for GNU Emacs, the 
> Swiss army knife of text editors wrote:
>> First of all, i can't execute 'sudo lsof | grep delete | head -10' in
>> eshell.
> 
> 'sudo -S' should help here: it'll output the sudo password prompt on 
> stderr so that Eshell can see it and handle password entry. (You should 
> be able to enter your password anyway, but without the -S it would just 
> be echoed to the screen.)
> 
>   But that's not the most interesting part. I can execute the
>> command with 'eshell/sudo'. But after the command execution emacs will
>> take the whole CPU processing time if i have 
>> '(global-display-line-numbers-mode 1)'
>> option enabled.
> 
> I can't reproduce this particular issue, but I can reproduce *an* issue. 
> It seems to be due to "head -10" exiting early (as it should), which 
> results in a broken pipe. However, Eshell's broken pipe handling wasn't 
> properly cleaning up the process ("grep" in this example).

Here's a better patch, based on the recent improvements to Tramp in 
bug#72013.

[-- Attachment #2: 0001-Handle-broken-pipes-in-a-better-way-in-Eshell.patch --]
[-- Type: text/plain, Size: 2871 bytes --]

From fca40724de45d72d7309ec722399f7e0ce13d09f Mon Sep 17 00:00:00 2001
From: Jim Porter <jporterbugs@gmail.com>
Date: Sun, 14 Jul 2024 22:43:54 -0700
Subject: [PATCH] Handle broken pipes in a better way in Eshell

* lisp/eshell/esh-proc.el (eshell-insertion-filter): Send SIGPIPE,
falling back to SIGTERM (bug#72117).
---
 lisp/eshell/esh-proc.el | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el
index 2ff41c3d409..65537cf6adb 100644
--- a/lisp/eshell/esh-proc.el
+++ b/lisp/eshell/esh-proc.el
@@ -479,22 +479,22 @@ eshell-insertion-filter
                   "forwarding output from process `%s'\n\n%s" proc data)
                 (condition-case nil
                     (eshell-output-object data index handles)
-                  ;; FIXME: We want to send SIGPIPE to the process
-                  ;; here.  However, remote processes don't currently
-                  ;; support that, and not all systems have SIGPIPE in
-                  ;; the first place (e.g. MS Windows).  In these
-                  ;; cases, just delete the process; this is
-                  ;; reasonably close to the right behavior, since the
-                  ;; default action for SIGPIPE is to terminate the
-                  ;; process.  For use cases where SIGPIPE is truly
-                  ;; needed, using an external pipe operator (`*|')
-                  ;; may work instead (e.g. when working with remote
-                  ;; processes).
+                  ;; We want to send SIGPIPE to the process here.
+                  ;; However, MS-Windows doesn't support that, so send
+                  ;; SIGTERM there instead; this is reasonably close to
+                  ;; the right behavior, since the default action for
+                  ;; SIGPIPE is to terminate the process.  NOTE: Due to
+                  ;; the additional indirection of Emacs process
+                  ;; filters, the process will likely see the SIGPIPE
+                  ;; later than it would in a regular shell, which could
+                  ;; cause problems.  For cases where this matters,
+                  ;; using an external pipe operator (`*|') may work
+                  ;; instead.
                   (eshell-pipe-broken
-                   (if (or (process-get proc 'remote-pid)
-                           (eq system-type 'windows-nt))
-                       (delete-process proc)
-                     (signal-process proc 'SIGPIPE))))))
+                   (signal-process
+                    proc (if (or (not (eq system-type 'windows-nt))
+                                 (process-get proc 'remote-pid))
+                             'SIGPIPE 'SIGTERM))))))
                 (process-put proc :eshell-busy nil))))))
 
 (defun eshell-sentinel (proc string)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* bug#72117: Command doesn't execute correctly in eshell
       [not found]     ` <uDv8zx2ccT4dsHYBueowwgc6Hjuz4gs3wLRNNOXllaD4ifNUqW2-7eEYYJDjsG5VzBWGHQGoIJ1aFnbQxMLoacZR71w8v11rIb7GTfhQuus=@proton.me>
@ 2024-07-17  2:09       ` Jim Porter
  2024-07-18  5:05         ` Jim Porter
  0 siblings, 1 reply; 14+ messages in thread
From: Jim Porter @ 2024-07-17  2:09 UTC (permalink / raw)
  To: the_wurfkreuz; +Cc: 72117

(Don't forget to Reply All so that Debbugs is CCed in your message, or
else the tracker won't see your messages.)

On Tue, Jul 16, 2024 at 2:14 AM the_wurfkreuz <the_wurfkreuz@proton.me> wrote:
>
> I updated Emacs and used your latest patch. The problem with pipe is fixed as far as i can understand, but my original problem with executing the command through tramp (eshell/sudo) is still there, though it's elusive and hard to reproduce. Right now, i can't reproduce it launching bare Emacs (emacs -Q). And with my current config i was getting it around 50/50 of the time. When i got it, i had this message: 'error in process filter: Forbidden reentrant call of Tramp'.

After testing some more locally, I notice that too. Digging further,
this problem is actually multifaceted, and fixing all the different
issues I've uncovered would be too risky for Emacs 30. Does the first
patch I posted work for you? That's a lot simpler, and should be safe
enough for Emacs 30; then I can make more extensive fixes for Emacs
31.

(The "Forbidden reentrant call of Tramp" is likely occurring when
calling 'signal-process' on the "lsof" command, which could happen if
some Tramp code is above us in the stack; in that case,
'signal-process' would reenter Tramp code, and then Tramp bails out
just to be safe.)





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#72117: Command doesn't execute correctly in eshell
  2024-07-17  2:09       ` Jim Porter
@ 2024-07-18  5:05         ` Jim Porter
  2024-07-18  9:31           ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 14+ messages in thread
From: Jim Porter @ 2024-07-18  5:05 UTC (permalink / raw)
  To: the_wurfkreuz; +Cc: 72117

[-- Attachment #1: Type: text/plain, Size: 792 bytes --]

On 7/16/2024 7:09 PM, Jim Porter wrote:
> After testing some more locally, I notice that too. Digging further,
> this problem is actually multifaceted, and fixing all the different
> issues I've uncovered would be too risky for Emacs 30. Does the first
> patch I posted work for you? That's a lot simpler, and should be safe
> enough for Emacs 30; then I can make more extensive fixes for Emacs
> 31.

I think the attached patches would work for Emacs 31, but are almost 
certainly too risky for Emacs 30. The first one especially changes some 
very fundamental parts of Eshell, though happily in a way that 
simplifies it a bit overall.

The original patch I posted is probably the safest for Emacs 30, since 
it's only a slight tweak to how we kill processes when their output pipe 
breaks.

[-- Attachment #2: 0001-Improve-handling-of-deferrable-Eshell-commands.patch --]
[-- Type: text/plain, Size: 11218 bytes --]

From 0dd4f3fb123a626662b0951f8dea49ec2e78a3d3 Mon Sep 17 00:00:00 2001
From: Jim Porter <jporterbugs@gmail.com>
Date: Tue, 16 Jul 2024 22:07:33 -0700
Subject: [PATCH 1/2] Improve handling of deferrable Eshell commands

Now, we use the 'eshell-deferrable' wrapper to wrap a form that returns
a process (or list thereof).  This improves upon the old method, which
failed to handle 'eshell-replace-command' correctly.  In that case,
Eshell would fail to unmark commands as deferrable when necessary
(e.g. for commands in pipelines).

* lisp/eshell/esh-cmd.el (eshell-deferrable-commands): Make into a
defvar.
(eshell-deferrable): New function...
(eshell-structure-basic-command): ... use it.
(eshell-trap-errors): Rename to...
(eshell-do-command): ... this, and use 'eshell-deferrable'.  Update
callers.
(eshell--unmark-deferrable): Remove.  Update callers.
(eshell-execute-pipeline): Remove 'eshell-process-identity'.
(eshell-process-identity, eshell-named-command*, eshell-lisp-command*):
Make obsolete.

* test/lisp/eshell/esh-cmd-tests.el (eshell-test-replace-command): New
function.
(esh-cmd-test/pipeline/replace-command): New test.
---
 lisp/eshell/esh-cmd.el               | 67 +++++++++++-----------------
 test/lisp/eshell/em-extpipe-tests.el |  2 +-
 test/lisp/eshell/em-tramp-tests.el   |  3 +-
 test/lisp/eshell/esh-cmd-tests.el    | 18 ++++++++
 4 files changed, 47 insertions(+), 43 deletions(-)

diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el
index c8579c83405..099e97a083d 100644
--- a/lisp/eshell/esh-cmd.el
+++ b/lisp/eshell/esh-cmd.el
@@ -240,16 +240,6 @@ eshell-cmd-load-hook
   :version "24.1"		       ; removed eshell-cmd-initialize
   :type 'hook)
 
-(defcustom eshell-deferrable-commands
-  '(eshell-named-command
-    eshell-lisp-command
-    eshell-process-identity)
-  "A list of functions which might return an asynchronous process.
-If they return a process object, execution of the calling Eshell
-command will wait for completion (in the background) before finishing
-the command."
-  :type '(repeat function))
-
 (defcustom eshell-subcommand-bindings
   '((eshell-in-subcommand-p t)
     (eshell-in-pipeline-p nil)
@@ -289,6 +279,12 @@ eshell-in-subcommand-p
 (defvar eshell-last-arguments nil)
 (defvar eshell-last-command-name nil)
 
+(defvar eshell-deferrable-commands '(eshell-deferrable)
+  "A list of functions which might return a deferrable process.
+If they return a process object (or list thereof), execution of the
+calling Eshell command will wait for completion (in the background)
+before finishing the command.")
+
 (defvar eshell-allow-commands t
   "If non-nil, allow evaluating command forms (including Lisp forms).
 If you want to forbid command forms, you can let-bind this to a
@@ -426,7 +422,7 @@ eshell-parse-command
                   (error "Empty command before `&'"))
               (setq cmd (eshell-parse-pipeline cmd))
               (unless eshell-in-pipeline-p
-                (setq cmd `(eshell-trap-errors ,cmd)))
+                (setq cmd `(eshell-do-command ,cmd)))
               ;; Copy I/O handles so each full statement can manipulate
               ;; them if they like.  Steal the handles for the last
               ;; command (first in our reversed list); we won't use the
@@ -565,7 +561,7 @@ eshell-structure-basic-command
   ;; statement.
   (unless (memq (car test) '(eshell-convert eshell-escape-arg))
     (setq test
-	  `(progn ,test
+	  `(progn (eshell-deferrable ,test)
                   (eshell-exit-success-p))))
 
   ;; should we reverse the sense of the test?  This depends
@@ -776,7 +772,7 @@ eshell-commands
 
 (defvar eshell-this-command-hook nil)
 
-(defmacro eshell-trap-errors (object)
+(defmacro eshell-do-command (object)
   "Trap any errors that occur, so they are not entirely fatal.
 Also, the variable `eshell-this-command-hook' is available for the
 duration of OBJECT's evaluation.  Note that functions should be added
@@ -787,12 +783,19 @@ eshell-trap-errors
   `(eshell-condition-case err
        (let ((eshell-this-command-hook '(ignore)))
          (unwind-protect
-             ,object
+             (eshell-deferrable ,object)
            (mapc #'funcall eshell-this-command-hook)))
      (error
       (eshell-errorn (error-message-string err))
       (eshell-close-handles 1))))
 
+(define-obsolete-function-alias 'eshell-trap-errors #'eshell-do-command "31.1")
+
+(defalias 'eshell-deferrable 'identity
+  "A wrapper to mark a particular form as potentially deferrable.
+If the wrapped form returns a process (or list thereof), Eshell will
+wait for completion in the background for the process(es) to complete.")
+
 (defmacro eshell-with-copied-handles (object &optional steal-p)
   "Duplicate current I/O handles, so OBJECT works with its own copy.
 If STEAL-P is non-nil, these new handles will be stolen from the
@@ -810,27 +813,12 @@ eshell-protect
      (eshell-protect-handles eshell-current-handles)
      ,object))
 
-(defun eshell--unmark-deferrable (command)
-  "If COMMAND is (or ends with) a deferrable command, unmark it as such.
-This changes COMMAND in-place by converting function calls listed
-in `eshell-deferrable-commands' to their non-deferrable forms so
-that Eshell doesn't erroneously allow deferring it.  For example,
-`eshell-named-command' becomes `eshell-named-command*'."
-  (let ((cmd command))
-    (when (memq (car cmd) '(let progn))
-      (setq cmd (car (last cmd))))
-    (when (memq (car cmd) eshell-deferrable-commands)
-      (setcar cmd (intern-soft
-		   (concat (symbol-name (car cmd)) "*"))))
-    command))
-
 (defmacro eshell-do-pipelines (pipeline &optional notfirst)
   "Execute the commands in PIPELINE, connecting each to one another.
 Returns a list of the processes in the pipeline.
 
 This macro calls itself recursively, with NOTFIRST non-nil."
   (when (setq pipeline (cadr pipeline))
-    (eshell--unmark-deferrable (car pipeline))
     `(eshell-with-copied-handles
       (let ((next-procs
              ,(when (cdr pipeline)
@@ -860,8 +848,6 @@ eshell-do-pipelines-synchronously
 This is used on systems where async subprocesses are not
 supported."
   (when (setq pipeline (cadr pipeline))
-    ;; FIXME: is deferrable significant here?
-    (eshell--unmark-deferrable (car pipeline))
     `(prog1
          (eshell-with-copied-handles
           (progn
@@ -879,14 +865,13 @@ eshell-do-pipelines-synchronously
        ,(when (cdr pipeline)
           `(eshell-do-pipelines-synchronously (quote ,(cdr pipeline)))))))
 
-(defalias 'eshell-process-identity 'identity)
+(define-obsolete-function-alias 'eshell-process-identity #'identity "31.1")
 
 (defmacro eshell-execute-pipeline (pipeline)
   "Execute the commands in PIPELINE, connecting each to one another."
-  `(eshell-process-identity
-    ,(if eshell-supports-asynchronous-processes
-         `(remove nil (eshell-do-pipelines ,pipeline))
-       `(eshell-do-pipelines-synchronously ,pipeline))))
+  (if eshell-supports-asynchronous-processes
+      `(remove nil (eshell-do-pipelines ,pipeline))
+    `(eshell-do-pipelines-synchronously ,pipeline)))
 
 (defmacro eshell-as-subcommand (command)
   "Execute COMMAND as a subcommand.
@@ -951,7 +936,7 @@ eshell--invoke-command-directly-p
 
 * The command is of the form
   (eshell-with-copied-handles
-   (eshell-trap-errors (eshell-named-command NAME [ARGS])) _).
+   (eshell-do-command (eshell-named-command NAME [ARGS])) _).
 
 * NAME is a string referring to an alias function and isn't a
   complex command (see `eshell-complex-commands').
@@ -959,7 +944,7 @@ eshell--invoke-command-directly-p
 * Any subcommands in ARGS can also be invoked directly."
   (pcase command
     (`(eshell-with-copied-handles
-       (eshell-trap-errors (eshell-named-command ,name . ,args))
+       (eshell-do-command (eshell-named-command ,name . ,args))
        ,_)
      (and name (stringp name)
 	  (not (member name eshell-complex-commands))
@@ -1360,7 +1345,8 @@ eshell-named-command
         (eshell-plain-command eshell-last-command-name
                               eshell-last-arguments))))
 
-(defalias 'eshell-named-command* 'eshell-named-command)
+(define-obsolete-function-alias 'eshell-named-command* #'eshell-named-command
+  "31.1")
 
 (defun eshell-find-alias-function (name)
   "Check whether a function called `eshell/NAME' exists."
@@ -1558,7 +1544,8 @@ eshell-lisp-command
          2)
        (list 'quote result)))))
 
-(defalias 'eshell-lisp-command* #'eshell-lisp-command)
+(define-obsolete-function-alias 'eshell-lisp-command* #'eshell-lisp-command
+  "31.1")
 
 (provide 'esh-cmd)
 
diff --git a/test/lisp/eshell/em-extpipe-tests.el b/test/lisp/eshell/em-extpipe-tests.el
index c5f1301cd3b..4c3adbc2d90 100644
--- a/test/lisp/eshell/em-extpipe-tests.el
+++ b/test/lisp/eshell/em-extpipe-tests.el
@@ -40,7 +40,7 @@ em-extpipe-tests--deftest
          ((should-parse (expected)
             `(let ((shell-file-name "sh")
                    (shell-command-switch "-c"))
-               ;; Strip `eshell-trap-errors'.
+               ;; Strip `eshell-do-command'.
                (should (equal ,expected
                               (cadadr (eshell-parse-command input))))))
           (with-substitute-for-temp (&rest body)
diff --git a/test/lisp/eshell/em-tramp-tests.el b/test/lisp/eshell/em-tramp-tests.el
index 3be5d3542ca..49dd5a78c3d 100644
--- a/test/lisp/eshell/em-tramp-tests.el
+++ b/test/lisp/eshell/em-tramp-tests.el
@@ -29,8 +29,7 @@ em-tramp-test/should-replace-command
   `(should (equal
             (catch 'eshell-replace-command ,form)
             (list 'eshell-with-copied-handles
-                  (list 'eshell-trap-errors
-                        ,replacement)
+                  (list 'eshell-do-command ,replacement)
                   t))))
 
 (ert-deftest em-tramp-test/su-default ()
diff --git a/test/lisp/eshell/esh-cmd-tests.el b/test/lisp/eshell/esh-cmd-tests.el
index d8124a19af6..18ea1f9a9d6 100644
--- a/test/lisp/eshell/esh-cmd-tests.el
+++ b/test/lisp/eshell/esh-cmd-tests.el
@@ -34,6 +34,10 @@
 
 (defvar eshell-test-value nil)
 
+(defun eshell-test-replace-command (command &rest args)
+  "Run COMMAND with ARGS by throwing `eshell-replace-command'."
+  (throw 'eshell-replace-command `(eshell-named-command ,command ',args)))
+
 ;;; Tests:
 
 \f
@@ -265,6 +269,20 @@ esh-cmd-test/reset-in-pipeline/lisp
      (format template "format \"%s\" eshell-in-pipeline-p")
      "nil")))
 
+(ert-deftest esh-cmd-test/pipeline/replace-command ()
+  "Ensure that `eshell-replace-command' doesn't affect Eshell deferral.
+Pipelines want to defer (yield) execution after starting all the
+processes in the pipeline, not before.  This lets us track all the
+processes correctly."
+  (skip-unless (and (executable-find "sleep")
+                    (executable-find "cat")))
+  (with-temp-eshell
+    (eshell-insert-command "eshell-test-replace-command *sleep 1 | cat")
+    ;; Make sure both processes are in `eshell-foreground-command'; this
+    ;; makes sure that the first command (which was replaced via
+    ;; `eshell-replace-command' isn't deferred by `eshell-do-eval'.
+    (should (= (length (cadr eshell-foreground-command)) 2))))
+
 \f
 ;; Control flow statements
 
-- 
2.25.1


[-- Attachment #3: 0002-Handle-broken-pipes-in-a-better-way-in-Eshell.patch --]
[-- Type: text/plain, Size: 3303 bytes --]

From 9d978dc8378bb63f167ca52899348c60c524a7c1 Mon Sep 17 00:00:00 2001
From: Jim Porter <jporterbugs@gmail.com>
Date: Sun, 14 Jul 2024 22:43:54 -0700
Subject: [PATCH 2/2] Handle broken pipes in a better way in Eshell

* lisp/eshell/esh-proc.el (eshell-insertion-filter): Send SIGPIPE
delaying for Tramp and falling back to SIGTERM for MS-Windows
(bug#72117).
---
 lisp/eshell/esh-proc.el | 37 +++++++++++++++++++++----------------
 1 file changed, 21 insertions(+), 16 deletions(-)

diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el
index 0dcdf3bb76c..fbeb13362f3 100644
--- a/lisp/eshell/esh-proc.el
+++ b/lisp/eshell/esh-proc.el
@@ -515,23 +515,28 @@ eshell-insertion-filter
                   "forwarding output from process `%s'\n\n%s" proc data)
                 (condition-case nil
                     (eshell-output-object data index handles)
-                  ;; FIXME: We want to send SIGPIPE to the process
-                  ;; here.  However, remote processes don't currently
-                  ;; support that, and not all systems have SIGPIPE in
-                  ;; the first place (e.g. MS Windows).  In these
-                  ;; cases, just delete the process; this is
-                  ;; reasonably close to the right behavior, since the
-                  ;; default action for SIGPIPE is to terminate the
-                  ;; process.  For use cases where SIGPIPE is truly
-                  ;; needed, using an external pipe operator (`*|')
-                  ;; may work instead (e.g. when working with remote
-                  ;; processes).
                   (eshell-pipe-broken
-                   (if (or (process-get proc 'remote-pid)
-                           (eq system-type 'windows-nt))
-                       (delete-process proc)
-                     (signal-process proc 'SIGPIPE))))))
-                (process-put proc :eshell-busy nil))))))
+                   ;; The output pipe broke, so send SIGPIPE to the
+                   ;; process.  NOTE: Due to the additional indirection
+                   ;; of Emacs process filters, the process will likely
+                   ;; see the SIGPIPE later than it would in a regular
+                   ;; shell, which could cause problems.  For cases
+                   ;; where this matters, using an external pipe
+                   ;; operator (`*|') may work instead.
+                   (cond
+                    ;; Delay signalling remote processes to prevent
+                    ;; "Forbidden reentrant call of Tramp".
+                    ((process-get proc 'remote-pid)
+                     (run-at-time 0 nil #'signal-process proc 'SIGPIPE))
+                    ;; MS-Windows doesn't support SIGPIPE, so send
+                    ;; SIGTERM there instead; this is reasonably close
+                    ;; to the right behavior, since the default action
+                    ;; for SIGPIPE is to terminate the process.
+                    ((eq system-type 'windows-nt)
+                     (signal-process proc 'SIGTERM))
+                    (t
+                     (signal-process proc 'SIGPIPE)))))))
+          (process-put proc :eshell-busy nil))))))
 
 (defun eshell-sentinel (proc string)
   "Generic sentinel for command processes.  Reports only signals.
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* bug#72117: Command doesn't execute correctly in eshell
  2024-07-18  5:05         ` Jim Porter
@ 2024-07-18  9:31           ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-07-18 15:38             ` Jim Porter
  0 siblings, 1 reply; 14+ messages in thread
From: Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-07-18  9:31 UTC (permalink / raw)
  To: Jim Porter; +Cc: the_wurfkreuz, 72117

Jim Porter <jporterbugs@gmail.com> writes:

Hi Jim,

> diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el
> index 0dcdf3bb76c..fbeb13362f3 100644
> --- a/lisp/eshell/esh-proc.el
> +++ b/lisp/eshell/esh-proc.el
> +                   (cond
> +                    ;; Delay signalling remote processes to prevent
> +                    ;; "Forbidden reentrant call of Tramp".
> +                    ((process-get proc 'remote-pid)
> +                     (run-at-time 0 nil #'signal-process proc 'SIGPIPE))

Shouldn't there be a non-nil REMOTE argument?

Best regards, Michael.





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#72117: Command doesn't execute correctly in eshell
  2024-07-18  9:31           ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-07-18 15:38             ` Jim Porter
  2024-07-18 16:49               ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 14+ messages in thread
From: Jim Porter @ 2024-07-18 15:38 UTC (permalink / raw)
  To: Michael Albinus; +Cc: the_wurfkreuz, 72117

On 7/18/2024 2:31 AM, Michael Albinus via Bug reports for GNU Emacs, the 
Swiss army knife of text editors wrote:
> Jim Porter <jporterbugs@gmail.com> writes:
> 
>> diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el
>> index 0dcdf3bb76c..fbeb13362f3 100644
>> --- a/lisp/eshell/esh-proc.el
>> +++ b/lisp/eshell/esh-proc.el
>> +                   (cond
>> +                    ;; Delay signalling remote processes to prevent
>> +                    ;; "Forbidden reentrant call of Tramp".
>> +                    ((process-get proc 'remote-pid)
>> +                     (run-at-time 0 nil #'signal-process proc 'SIGPIPE))
> 
> Shouldn't there be a non-nil REMOTE argument?

Isn't a process object with the 'remote-pid' property set sufficient 
here? From my understanding of the code, REMOTE is redundant in that case.

(I'll probably need the REMOTE argument in some other Eshell code that 
we've been discussing recently, but not here I think...)





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#72117: Command doesn't execute correctly in eshell
  2024-07-18 15:38             ` Jim Porter
@ 2024-07-18 16:49               ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2024-07-18 18:26                 ` Jim Porter
  0 siblings, 1 reply; 14+ messages in thread
From: Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-07-18 16:49 UTC (permalink / raw)
  To: Jim Porter; +Cc: the_wurfkreuz, 72117

Jim Porter <jporterbugs@gmail.com> writes:

Hi Jim,

>>> diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el
>>> index 0dcdf3bb76c..fbeb13362f3 100644
>>> --- a/lisp/eshell/esh-proc.el
>>> +++ b/lisp/eshell/esh-proc.el
>>> +                   (cond
>>> +                    ;; Delay signalling remote processes to prevent
>>> +                    ;; "Forbidden reentrant call of Tramp".
>>> +                    ((process-get proc 'remote-pid)
>>> +                     (run-at-time 0 nil #'signal-process proc 'SIGPIPE))
>> Shouldn't there be a non-nil REMOTE argument?
>
> Isn't a process object with the 'remote-pid' property set sufficient
> here? From my understanding of the code, REMOTE is redundant in that
> case.

You're right, I've misremembered. Sorry for the noise.

Best regards, Michael.





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#72117: Command doesn't execute correctly in eshell
  2024-07-18 16:49               ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-07-18 18:26                 ` Jim Porter
  0 siblings, 0 replies; 14+ messages in thread
From: Jim Porter @ 2024-07-18 18:26 UTC (permalink / raw)
  To: Michael Albinus; +Cc: the_wurfkreuz, 72117

On 7/18/2024 9:49 AM, Michael Albinus via Bug reports for GNU Emacs, the 
Swiss army knife of text editors wrote:
> You're right, I've misremembered. Sorry for the noise.

No worries! Merged these patches to the master branch as c7a498260ce. 
Leaving this open to handle the release branch side. If there's anything 
still broken on the master branch, I can merge some followups, but the 
existing patches should improve matters in Eshell generally.





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#72117: Command doesn't execute correctly in eshell
  2024-07-15  1:01 ` Jim Porter
  2024-07-16  3:09   ` Jim Porter
@ 2024-07-27  5:18   ` Jim Porter
  2024-07-27  6:40     ` Eli Zaretskii
  1 sibling, 1 reply; 14+ messages in thread
From: Jim Porter @ 2024-07-27  5:18 UTC (permalink / raw)
  To: the_wurfkreuz, 72117; +Cc: eliz

[-- Attachment #1: Type: text/plain, Size: 1914 bytes --]

On 7/14/2024 6:01 PM, Jim Porter wrote:
> On 7/14/2024 12:33 PM, the_wurfkreuz via Bug reports for GNU Emacs, the 
> Swiss army knife of text editors wrote:
>   But that's not the most interesting part. I can execute the
>> command with 'eshell/sudo'. But after the command execution emacs will
>> take the whole CPU processing time if i have 
>> '(global-display-line-numbers-mode 1)'
>> option enabled.
> 
> I can't reproduce this particular issue, but I can reproduce *an* issue. 
> It seems to be due to "head -10" exiting early (as it should), which 
> results in a broken pipe. However, Eshell's broken pipe handling wasn't 
> properly cleaning up the process ("grep" in this example).

Eli, would this patch (re-attached here) be ok for Emacs 30? It's not a 
perfect solution (the fix currently on master is much better), but it's 
the least-risky change to this code that I could make, and it should 
improve matters somewhat for the release branch.

To summarize the problem so you have a bit more context for what this is 
changing: in Eshell, if you have a pipeline like "cat some-file | head 
-10", then the "head" process can exit early and raise an 
'eshell-pipe-broken' signal. The process filter for "cat" will catch 
this signal and try to send SIGPIPE to the actual "cat" process. 
However, for MS-Windows (which doesn't have SIGPIPE), and Tramp (where I 
couldn't get 'signal-process' to work due to another bug[1]), it just 
deletes the process. Unfortunately, that was failing to clean up the 
stderr "process" object, which caused Eshell to think the command wasn't 
complete. By changing to 'kill-process', this cleanup happens and things 
work more smoothly.

If you'd prefer to leave it as-is on Emacs 30, I don't mind either. This 
bug has been present since 29.1, and it took quite a while for anyone to 
notice it, so it probably doesn't come up terribly often.

[1] This is now fixed.

[-- Attachment #2: 0001-Use-kill-process-as-a-fallback-when-a-pipe-gets-brok.patch --]
[-- Type: text/plain, Size: 1715 bytes --]

From cc188c56e0b4313e55af60683f2d1cf9c7f00e1b Mon Sep 17 00:00:00 2001
From: Jim Porter <jporterbugs@gmail.com>
Date: Sun, 14 Jul 2024 16:51:43 -0700
Subject: [PATCH] Use 'kill-process' as a fallback when a pipe gets broken in
 Eshell

This is better than 'delete-process' since it will ensure that any
stderr pipe-processes get stopped as well (bug#72117).

* lisp/eshell/esh-proc.el (eshell-insertion-filter): Use 'kill-process'
instead of 'delete-process'.
---
 lisp/eshell/esh-proc.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el
index 0dcdf3bb76c..cb57bb305cc 100644
--- a/lisp/eshell/esh-proc.el
+++ b/lisp/eshell/esh-proc.el
@@ -519,7 +519,7 @@ eshell-insertion-filter
                   ;; here.  However, remote processes don't currently
                   ;; support that, and not all systems have SIGPIPE in
                   ;; the first place (e.g. MS Windows).  In these
-                  ;; cases, just delete the process; this is
+                  ;; cases, just kill the process; this is
                   ;; reasonably close to the right behavior, since the
                   ;; default action for SIGPIPE is to terminate the
                   ;; process.  For use cases where SIGPIPE is truly
@@ -529,7 +529,7 @@ eshell-insertion-filter
                   (eshell-pipe-broken
                    (if (or (process-get proc 'remote-pid)
                            (eq system-type 'windows-nt))
-                       (delete-process proc)
+                       (kill-process proc)
                      (signal-process proc 'SIGPIPE))))))
                 (process-put proc :eshell-busy nil))))))
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* bug#72117: Command doesn't execute correctly in eshell
  2024-07-27  5:18   ` Jim Porter
@ 2024-07-27  6:40     ` Eli Zaretskii
  2024-07-27 19:14       ` Jim Porter
  0 siblings, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2024-07-27  6:40 UTC (permalink / raw)
  To: Jim Porter; +Cc: the_wurfkreuz, 72117

> Date: Fri, 26 Jul 2024 22:18:22 -0700
> From: Jim Porter <jporterbugs@gmail.com>
> Cc: eliz@gnu.org
> 
> On 7/14/2024 6:01 PM, Jim Porter wrote:
> > On 7/14/2024 12:33 PM, the_wurfkreuz via Bug reports for GNU Emacs, the 
> > Swiss army knife of text editors wrote:
> >   But that's not the most interesting part. I can execute the
> >> command with 'eshell/sudo'. But after the command execution emacs will
> >> take the whole CPU processing time if i have 
> >> '(global-display-line-numbers-mode 1)'
> >> option enabled.
> > 
> > I can't reproduce this particular issue, but I can reproduce *an* issue. 
> > It seems to be due to "head -10" exiting early (as it should), which 
> > results in a broken pipe. However, Eshell's broken pipe handling wasn't 
> > properly cleaning up the process ("grep" in this example).
> 
> Eli, would this patch (re-attached here) be ok for Emacs 30? It's not a 
> perfect solution (the fix currently on master is much better), but it's 
> the least-risky change to this code that I could make, and it should 
> improve matters somewhat for the release branch.

This is okay for emacs-30, thanks.





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#72117: Command doesn't execute correctly in eshell
  2024-07-27  6:40     ` Eli Zaretskii
@ 2024-07-27 19:14       ` Jim Porter
  2024-07-28  7:59         ` Jim Porter
  0 siblings, 1 reply; 14+ messages in thread
From: Jim Porter @ 2024-07-27 19:14 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 72117-done, the_wurfkreuz

On 7/26/2024 11:40 PM, Eli Zaretskii wrote:
> This is okay for emacs-30, thanks.

Thanks. Merged to the release branch as 469bc7c9686, and closing this 
bug now.





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#72117: Command doesn't execute correctly in eshell
  2024-07-27 19:14       ` Jim Porter
@ 2024-07-28  7:59         ` Jim Porter
  2024-07-28 16:21           ` Jim Porter
  0 siblings, 1 reply; 14+ messages in thread
From: Jim Porter @ 2024-07-28  7:59 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: the_wurfkreuz, 72117

On 7/27/2024 12:14 PM, Jim Porter wrote:
> On 7/26/2024 11:40 PM, Eli Zaretskii wrote:
>> This is okay for emacs-30, thanks.
> 
> Thanks. Merged to the release branch as 469bc7c9686, and closing this 
> bug now.

I just realized that I forgot to add "Do not merge to master" to the 
commit message (this was already fixed in a better way on master). I'm 
not at my development system right now, but if no one else has merged 
from the release branch to master by the time I'm back, hopefully this 
message will help clarify things.

Sorry for forgetting about that.





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#72117: Command doesn't execute correctly in eshell
  2024-07-28  7:59         ` Jim Porter
@ 2024-07-28 16:21           ` Jim Porter
  0 siblings, 0 replies; 14+ messages in thread
From: Jim Porter @ 2024-07-28 16:21 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: the_wurfkreuz, 72117

On 7/28/2024 12:59 AM, Jim Porter wrote:
> I just realized that I forgot to add "Do not merge to master" to the 
> commit message (this was already fixed in a better way on master). I'm 
> not at my development system right now, but if no one else has merged 
> from the release branch to master by the time I'm back, hopefully this 
> message will help clarify things.

I've now performed the merge, so there should (hopefully) be no problems 
with future merges from the release branch.





^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2024-07-28 16:21 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-14 19:33 bug#72117: Command doesn't execute correctly in eshell the_wurfkreuz via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-15  1:01 ` Jim Porter
2024-07-16  3:09   ` Jim Porter
     [not found]     ` <uDv8zx2ccT4dsHYBueowwgc6Hjuz4gs3wLRNNOXllaD4ifNUqW2-7eEYYJDjsG5VzBWGHQGoIJ1aFnbQxMLoacZR71w8v11rIb7GTfhQuus=@proton.me>
2024-07-17  2:09       ` Jim Porter
2024-07-18  5:05         ` Jim Porter
2024-07-18  9:31           ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-18 15:38             ` Jim Porter
2024-07-18 16:49               ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-18 18:26                 ` Jim Porter
2024-07-27  5:18   ` Jim Porter
2024-07-27  6:40     ` Eli Zaretskii
2024-07-27 19:14       ` Jim Porter
2024-07-28  7:59         ` Jim Porter
2024-07-28 16:21           ` Jim Porter

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.