unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: 38035@debbugs.gnu.org
Subject: bug#38035: 27.0.50; Trivial errors in process filters can render Emacs unusable
Date: Sat, 02 Nov 2019 18:53:57 +0100	[thread overview]
Message-ID: <874kzmdv0q.fsf@gnus.org> (raw)


If you eval the following, your Emacs will become unusable and you'll
have to kill it (so don't eval it):

(let ((process (start-process
		"foo" (get-buffer-create "*foo*")
		"bash" "-c" "while true; do echo foo; sleep 1; done")))
  (set-process-filter
   process
   (lambda (&rest _)
     (error))))

The reason for this is that when signalling an error from a process
filter, Emacs messages the error message and then seems to sleep for a
second?  I haven't investigated the code yet.

This is something that has bit me more than a few times when working
with process filters (i.e., making a syntax error and then having Emacs
blow up on me).

I'm not sure what solution would be best.  I see two obvious things we
could do: Remove the process filter, so that it doesn't trigger again.
Or -- remove the one-second sleep, which would allow the user to `M-x
list-processes' and kill the offending process.


In GNU Emacs 27.0.50 (build 6, x86_64-pc-linux-gnu, GTK+ Version 3.24.5)
 of 2019-11-01 built on marnie
Repository revision: eda98211e31ed969823c1048b3cde635e08eebe5
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12004000
System Description: Debian GNU/Linux 10 (buster)


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no






             reply	other threads:[~2019-11-02 17:53 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-02 17:53 Lars Ingebrigtsen [this message]
2019-11-02 18:36 ` bug#38035: 27.0.50; Trivial errors in process filters can render Emacs unusable Eli Zaretskii
2019-11-02 18:38   ` Lars Ingebrigtsen
2019-11-02 18:40     ` Eli Zaretskii
2019-11-03 13:21 ` Richard Stallman
2019-11-03 14:52   ` Lars Ingebrigtsen
2019-11-03 15:51   ` Eli Zaretskii
2019-11-03 16:39     ` Lars Ingebrigtsen
2019-11-03 17:03       ` Eli Zaretskii
2019-11-08 20:42         ` Lars Ingebrigtsen
2019-11-08 20:50           ` Eli Zaretskii
2019-11-08 20:54             ` Lars Ingebrigtsen
2019-11-09  6:24               ` Eli Zaretskii
2019-11-09 20:34                 ` Lars Ingebrigtsen
2019-11-14  8:58                   ` Eli Zaretskii
2019-11-14  9:56                     ` Lars Ingebrigtsen
2019-11-14 14:13                       ` Eli Zaretskii
2019-11-15  7:53                         ` Lars Ingebrigtsen
2019-11-04  3:55     ` Richard Stallman
2021-12-02 11:55 ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874kzmdv0q.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=38035@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).