[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#29347: 27.0.50; C-g doesn't quit minibuffer
From: |
Eli Zaretskii |
Subject: |
bug#29347: 27.0.50; C-g doesn't quit minibuffer |
Date: |
Fri, 24 Nov 2017 23:14:16 +0200 |
> Date: Fri, 24 Nov 2017 18:17:58 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 29370@debbugs.gnu.org, 29347@debbugs.gnu.org, rms@gnu.org
>
> I think I fixed the problem which caused Emacs to hang in this
> particular scenario, but I'm not sure Richard is seeing the same
> problem. The change I installed on the emacs-26 branch is below;
> Richard, please try applying it, and see if your problems go away.
Sorry, wrong patch. Please use the one below instead.
diff --git a/src/thread.c b/src/thread.c
index c03cdda..1ded8f5 100644
--- a/src/thread.c
+++ b/src/thread.c
@@ -97,7 +97,12 @@ post_acquire_global_lock (struct thread_state *self)
static void
acquire_global_lock (struct thread_state *self)
{
- sys_mutex_lock (&global_lock);
+ /* If some Lisp was interrupted by C-g while inside pselect, the
+ signal handler could have called maybe_reacquire_global_lock, in
+ which case we are already holding the lock and shouldn't try
+ taking it again, or else we will hang forever. */
+ if (!(self && !self->not_holding_lock))
+ sys_mutex_lock (&global_lock);
post_acquire_global_lock (self);
}
bug#29347: 27.0.50; C-g doesn't quit minibuffer, Mike Gerwitz, 2017/11/20
bug#29347: 27.0.50; C-g doesn't quit minibuffer, Mike Gerwitz, 2017/11/26
bug#29347: 27.0.50; C-g doesn't quit minibuffer, Eli Zaretskii, 2017/11/27
bug#29370: bug#29347: 27.0.50; C-g doesn't quit minibuffer, Richard Stallman, 2017/11/27
bug#29347: 27.0.50; C-g doesn't quit minibuffer, Eli Zaretskii, 2017/11/27
bug#29347: 27.0.50; C-g doesn't quit minibuffer, Richard Stallman, 2017/11/20