From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Jan D." Newsgroups: gmane.emacs.devel Subject: Re: Possible bug in xfns.c Date: Sat, 26 Feb 2005 16:37:12 +0100 Message-ID: <6caafaac432f7e0ccd0d7659af49040d@swipnet.se> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v619.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1109432181 4058 80.91.229.2 (26 Feb 2005 15:36:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 26 Feb 2005 15:36:21 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 26 16:36:21 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1D53zJ-0006AU-HF for ged-emacs-devel@m.gmane.org; Sat, 26 Feb 2005 16:36:14 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D54HH-0001UM-UV for ged-emacs-devel@m.gmane.org; Sat, 26 Feb 2005 10:54:47 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1D54FV-0000LD-HV for emacs-devel@gnu.org; Sat, 26 Feb 2005 10:52:57 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1D54FS-0000KE-T6 for emacs-devel@gnu.org; Sat, 26 Feb 2005 10:52:56 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D54FS-0000JM-HG for emacs-devel@gnu.org; Sat, 26 Feb 2005 10:52:54 -0500 Original-Received: from [195.54.107.73] (helo=mxfep02.bredband.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1D540X-0006iN-RV; Sat, 26 Feb 2005 10:37:30 -0500 Original-Received: from coolsville.localdomain ([83.226.180.210] [83.226.180.210]) by mxfep02.bredband.com with ESMTP id <20050226153727.NNOY17521.mxfep02.bredband.com@coolsville.localdomain>; Sat, 26 Feb 2005 16:37:27 +0100 In-Reply-To: Original-To: David Kastrup X-Mailer: Apple Mail (2.619.2) 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 X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: main.gmane.org gmane.emacs.devel:33841 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:33841 2005-02-26 kl. 15.47 skrev David Kastrup: > > Throwing a signal restores interrupt_input_blocked to the state of the > recording of the stack frame. How does it do that? I can't find that in the code. I assumed record_unwind_protect did just that, recorded one unwind action to take. > In xfns.c, line 5207, we have a > BLOCK_INPUT. In line 5283 we have > > record_unwind_protect (clean_up_file_dialog, make_save_value (dialog, > 0)); > > That means that clean_up_file_dialog will get called in case of an > abort, and x_file_dialog will return with the value of > interrupt_input_blocked increased by one as opposed to the time of the > call. I'm not sure what you mean by an abort. The only code that does something like that is the Fsignal and the unbind_to after the UNBLOCK_INPUT. Are you saying that BLOCK_INPUT; ... record_unwind_protect() ... UNBLOCK_INPUT; unbind_to(); will make interrupt_input_blocked have a value of 1 after the unbind_to (assuming it was 0 before BLOCK_INPUT and no code in ... throws)? > > Shouldn't record_unwind_protect be enclosed with > UNBLOCK_INPUT/BLOCK_INPUT? That wouldn't be correct, but we could move it before the first BLOCK_INPUT. Jan D.