GNU bug report logs - #28630
27.0.50; C-g while a non-main thread is sitting crashes Emacs

Previous Next

Package: emacs;

Reported by: Alex <agrambot <at> gmail.com>

Date: Thu, 28 Sep 2017 07:24:01 UTC

Severity: normal

Found in version 27.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #91 received at 28630 <at> debbugs.gnu.org (full text, mbox):

From: Philipp Stephani <p.stephani2 <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>,
 YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>
Cc: 28630 <at> debbugs.gnu.org, tom <at> tromey.com, agrambot <at> gmail.com
Subject: Re: bug#28630: 27.0.50; C-g while a non-main thread is sitting
 crashes Emacs
Date: Sat, 07 Oct 2017 13:53:43 +0000
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> schrieb am Do., 5. Okt. 2017 um 09:25 Uhr:

> > Date: Thu, 05 Oct 2017 12:27:28 +0900
> > From: YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>
> > Cc: agrambot <at> gmail.com,
> >       28630-done <at> debbugs.gnu.org,
> >       tom <at> tromey.com
> >
> > >>>>> On Wed, 04 Oct 2017 12:23:19 +0300, Eli Zaretskii <eliz <at> gnu.org>
> said:
> >
> > >> > OOC, could you please see whether on X the sit-for call is
> > >> > interrupted or not?  That is, do you see the "there" message
> > >> > after typing C-g?
> > Same for NS.  Interestingly, some variants of the original recipe
> > behave differently with respect to C-g depending on the toolkit.
> >
> > Example 1:
> >
> > (thread-join
> >  (make-thread
> >   (lambda ()
> >     (message "hello")
> >     (sit-for 2)
> >     (message "there"))))
> >
> > Interrupted: GTK+, Athena, no toolkit, Mac
> > Not interrupted: NS
> >
> >
> > Example 2:
> >
> > (thread-join
> >  (make-thread
> >   (lambda ()
> >     (message "hello")
> >     (sleep-for 2)
> >     (message "there"))))
> >
> > Interrupted: GTK+
> > Not interrupted: Athena, no toolkit, Mac, NS
>
> For the record, on MS-Windows, both are interrupted.
>
> > Probably it has something to do with xg_select.
>
> Could be.
>
> The upshot of this is that doing keyboard I/O in non-main threads is
> inherently unportable.  Should we mention this in the manual?
>
>
>
>

I'd rather see this as a bug and document it in etc/PROBLEMS.
Also, if the behavior between main and non-main threads differ, there
should probably a `in-main-thread-p' function.
[Message part 2 (text/html, inline)]

This bug report was last modified 7 years and 285 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.