From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: usr1-signal, usr2-signal, etc. Date: Mon, 11 Dec 2006 10:41:30 +0100 Message-ID: References: <85fybuuggr.fsf@lola.goethe.zz> NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1165830180 7210 80.91.229.10 (11 Dec 2006 09:43:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 11 Dec 2006 09:43:00 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Dec 11 10:42:57 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by dough.gmane.org with esmtp (Exim 4.50) id 1GthgV-0000Cg-BL for ged-emacs-devel@m.gmane.org; Mon, 11 Dec 2006 10:42:55 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GthgU-0007Sg-QG for ged-emacs-devel@m.gmane.org; Mon, 11 Dec 2006 04:42:54 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Gthfd-0006r3-AQ for emacs-devel@gnu.org; Mon, 11 Dec 2006 04:42:01 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Gthfa-0006o4-5s for emacs-devel@gnu.org; Mon, 11 Dec 2006 04:42:00 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GthfZ-0006no-Ko for emacs-devel@gnu.org; Mon, 11 Dec 2006 04:41:57 -0500 Original-Received: from [195.41.46.237] (helo=pfepc.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GthfT-000275-Bk; Mon, 11 Dec 2006 04:41:51 -0500 Original-Received: from kfs-l.imdomain.dk.cua.dk (unknown [80.165.4.124]) by pfepc.post.tele.dk (Postfix) with SMTP id 4E52F8A009C; Mon, 11 Dec 2006 10:41:36 +0100 (CET) Original-To: YAMAMOTO Mitsuharu In-Reply-To: (YAMAMOTO Mitsuharu's message of "Fri\, 08 Dec 2006 19\:28\:33 +0900") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.91 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:63578 Archived-At: Thank you very much for the analysis. Could you please try to fix the problematic cases? YAMAMOTO Mitsuharu writes: >>>>>> On Tue, 05 Dec 2006 23:51:03 +0100, storm@cua.dk (Kim F. Storm) said: > >> AFAICS, kbd_buffer_store_event[_hold] is usually called inside >> BLOCK_INPUT, but there may be a few places where this is not the >> case, notably in keyboard.c (and in the signal handler). > >> Would someone pls. check [and fix] this?? One way could be to abort >> in kbd_buffer_store_event_hold if called without input blocked. > > All indirect calls from (*read_socket_hook), Fx_file_dialog, > xmenu_show, or xdialog_show are inside BLOCK_INPUT. But some calls > are not, because the current code (except handle_user_signal) assumes > that at most one signal handler will call kbd_buffer_store_event_hold > asynchronously, I think. > > * record_asynch_buffer_change either blocks SIGIO or stops polling > before calling kbd_buffer_store_event_hold. > > * The remaining case is the calls from read_avail_input: > > - gobble_input -> read_avail_input: > Like record_asynch_buffer_change above. > > - input_available_signal -> handle_async_input -> read_avail_input: > Inside the SIGIO handler and not interrupted by the same signal. > > - Other handle_async_input -> read_avail_input: > Inside #ifdef SYNC_INPUT. > > If polling used: > > - poll_for_input -> poll_for_input_1 -> read_avail_input: > Inside the SIGALRM handler and not interrupted by the same signal. > > - x_make_frame_visible -> poll_for_input_1 -> read_avail_input: > poll_suppress_count is set. > > - read_char -> kbd_buffer_get_event -> read_avail_input: > After STOP_POLLING. > > YAMAMOTO Mitsuharu > mituharu@math.s.chiba-u.ac.jp > > -- Kim F. Storm http://www.cua.dk