From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#51229: 28.0.50; [PATCH] Mitigate Blandyism on thread signals Date: Sat, 16 Oct 2021 14:52:21 +0300 Message-ID: <83r1clgpai.fsf@gnu.org> References: <87r1cmjfye.fsf@dick> <83mtnahzmj.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26488"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 51229@debbugs.gnu.org To: dick.r.chiang@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 16 13:53:16 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mbiFY-0006iI-J4 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 16 Oct 2021 13:53:16 +0200 Original-Received: from localhost ([::1]:60110 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mbiFW-0005Fb-GC for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 16 Oct 2021 07:53:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40664) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mbiFK-0005FR-FL for bug-gnu-emacs@gnu.org; Sat, 16 Oct 2021 07:53:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57757) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mbiFK-0000xW-79 for bug-gnu-emacs@gnu.org; Sat, 16 Oct 2021 07:53:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mbiFK-0006wL-6G for bug-gnu-emacs@gnu.org; Sat, 16 Oct 2021 07:53:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Oct 2021 11:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51229 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 51229-submit@debbugs.gnu.org id=B51229.163438514726637 (code B ref 51229); Sat, 16 Oct 2021 11:53:02 +0000 Original-Received: (at 51229) by debbugs.gnu.org; 16 Oct 2021 11:52:27 +0000 Original-Received: from localhost ([127.0.0.1]:41070 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mbiEk-0006vY-UX for submit@debbugs.gnu.org; Sat, 16 Oct 2021 07:52:27 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:38668) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mbiEj-0006vM-MT for 51229@debbugs.gnu.org; Sat, 16 Oct 2021 07:52:26 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:46098) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mbiEd-0000cn-N5; Sat, 16 Oct 2021 07:52:20 -0400 Original-Received: from [87.69.77.57] (port=3287 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mbiEd-0006OG-Ag; Sat, 16 Oct 2021 07:52:19 -0400 In-Reply-To: <83mtnahzmj.fsf@gnu.org> (message from Eli Zaretskii on Fri, 15 Oct 2021 22:11:32 +0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:217359 Archived-At: > Date: Fri, 15 Oct 2021 22:11:32 +0300 > From: Eli Zaretskii > Cc: 51229@debbugs.gnu.org > > > diff --git a/src/thread.c b/src/thread.c > > index 714b1cd903..d7dce6cc8e 100644 > > --- a/src/thread.c > > +++ b/src/thread.c > > @@ -122,6 +122,7 @@ post_acquire_global_lock (struct thread_state *self) > > > > current_thread->error_symbol = Qnil; > > current_thread->error_data = Qnil; > > + clear_waiting_for_input(); > > Fsignal (sym, data); > > } > > That's a non-starter, not unless you explain why this is not needed > for threads, because it attempts to artificially remove a restriction > without any analysis or rationale. Why is a non-main thread waiting > for input different from the main thread waiting for input? I've installed a fix on the emacs-28 branch, please test.