From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: C-g crash redux Date: Thu, 03 Aug 2006 20:32:43 -0400 Message-ID: <87zmelfihg.fsf@stupidchicken.com> References: <877j1qvp4k.fsf@pacem.orebokech.com> <17617.8764.824445.882539@kahikatea.snap.net.nz> <87fygd97j0.fsf@stupidchicken.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1154651616 6293 80.91.229.2 (4 Aug 2006 00:33:36 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 4 Aug 2006 00:33:36 +0000 (UTC) Cc: Nick Roberts , Romain Francoise , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 04 02:33:31 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1G8ncx-0001O2-7n for ged-emacs-devel@m.gmane.org; Fri, 04 Aug 2006 02:33:24 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G8ncv-0008BJ-R2 for ged-emacs-devel@m.gmane.org; Thu, 03 Aug 2006 20:33:21 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1G8ncg-00089k-Uh for emacs-devel@gnu.org; Thu, 03 Aug 2006 20:33:06 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G8ncg-00089T-H5 for emacs-devel@gnu.org; Thu, 03 Aug 2006 20:33:06 -0400 Original-Received: from [18.72.1.2] (helo=south-station-annex.mit.edu) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1G8ng6-0001Em-G2 for emacs-devel@gnu.org; Thu, 03 Aug 2006 20:36:39 -0400 Original-Received: from grand-central-station.mit.edu (GRAND-CENTRAL-STATION.MIT.EDU [18.7.21.82]) by south-station-annex.mit.edu (8.13.6/8.9.2) with ESMTP id k740WsPb014565; Thu, 3 Aug 2006 20:32:55 -0400 (EDT) Original-Received: from outgoing-legacy.mit.edu (OUTGOING-LEGACY.MIT.EDU [18.7.22.104]) by grand-central-station.mit.edu (8.13.6/8.9.2) with ESMTP id k740WpdU024617; Thu, 3 Aug 2006 20:32:53 -0400 (EDT) Original-Received: from cyd (SYDNEYPACIFIC-FOUR-SIXTY-SEVEN.MIT.EDU [18.95.6.212]) ) by outgoing-legacy.mit.edu (8.13.6/8.12.4) with ESMTP id k740WiSr013663; Thu, 3 Aug 2006 20:32:44 -0400 (EDT) Original-Received: from cyd by cyd with local (Exim 3.36 #1 (Debian)) id 1G8ncJ-0004nq-00; Thu, 03 Aug 2006 20:32:43 -0400 Original-To: storm@cua.dk (Kim F. Storm) In-Reply-To: (Kim F. Storm's message of "Fri, 04 Aug 2006 00:29:34 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-Spam-Score: X-Scanned-By: MIMEDefang 2.42 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:58070 Archived-At: >> Typing C-g, which runs interrupt_signal, runs quit_throw_to_read_char >> instead of Fsignal during when waiting_for_input is set (as it is >> during wait_reading_process_output). If I understand correctly, the >> purpose is to enable read-char to return a `C-g' character; and that's >> why it's both undesirable and unnecesssary to use a >> record_unwind_protect inside wait_reading_process_output. > > Ok, I see. > > But how do we ensure that waiting_for_user_input_p is restored > correctly on C-g? > > Or isn't that necessary? That's not necessary, since quit_throw_to_read_char calls clear_waiting_for_input, which resets waiting_for_input to 0. I guess someone worked all this out at some time in the past. I added a comment to the code to clarify this.