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.devel Subject: Re: Hang in make check Date: Mon, 29 Mar 2021 14:24:07 +0300 Message-ID: <8335wemcdk.fsf@gnu.org> References: <87czvj65tk.fsf@gmx.de> <878s675vbj.fsf@gmx.de> <875z1bozjm.fsf@gnus.org> <87r1jznjyf.fsf@gnus.org> <87mtunnjjy.fsf@gnus.org> <83lfa6mup3.fsf@gnu.org> <878s66ns14.fsf@gnus.org> <834kgumd9s.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11191"; mail-complaints-to="usenet@ciao.gmane.io" Cc: noloader@gmail.com, emacs-devel@gnu.org To: larsi@gnus.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Mar 29 13:25:30 2021 Return-path: Envelope-to: ged-emacs-devel@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 1lQq1R-0002iE-GO for ged-emacs-devel@m.gmane-mx.org; Mon, 29 Mar 2021 13:25:29 +0200 Original-Received: from localhost ([::1]:46342 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lQq1Q-0002VQ-Gh for ged-emacs-devel@m.gmane-mx.org; Mon, 29 Mar 2021 07:25:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49744) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lQq00-0001eu-VC for emacs-devel@gnu.org; Mon, 29 Mar 2021 07:24:01 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:41908) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lQq00-00008I-LY; Mon, 29 Mar 2021 07:24:00 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4131 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lQpzy-00066L-F6; Mon, 29 Mar 2021 07:24:00 -0400 In-Reply-To: <834kgumd9s.fsf@gnu.org> (message from Eli Zaretskii on Mon, 29 Mar 2021 14:04:47 +0300) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:267149 Archived-At: > Date: Mon, 29 Mar 2021 14:04:47 +0300 > From: Eli Zaretskii > Cc: noloader@gmail.com, emacs-devel@gnu.org > > > >> Seems to have something to do with timers and timeouts. This hangs: > > >> > > >> (read-event nil nil 1) > > >> > > >> when run in batch mode, apparently (instead of timing out after one > > >> second). > > > > > > But that's not what the test does (if it did, it would have hanged for > > > everyone, regardless of the build details). > > > > It's not what the test does -- I was stating that this form hangs (when > > in batch mode in this Emacs configuration). > > Sorry for my misunderstanding. I think the place where read-event hangs in that configuration is in this fragment from keyboard.c:kbd_buffer_get_event: #if !defined HAVE_DBUS && !defined USE_FILE_NOTIFY && !defined THREADS_ENABLED if (noninteractive /* In case we are running as a daemon, only do this before detaching from the terminal. */ || (IS_DAEMON && DAEMON_RUNNING)) { int c = getchar (); <<<<<<<<<<<<<<<<<<<<<<<<<< XSETINT (obj, c); *kbp = current_kboard; return obj; } #endif /* !defined HAVE_DBUS && !defined USE_FILE_NOTIFY && !defined THREADS_ENABLED */ But we still need to understand why this happens (if that's what happens) in the real test, because AFAIU when unread-command-events is non-nil, we were not supposed to get to this place, but instead return the event in unread-command-events.