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: C-g crash redux Date: Fri, 04 Aug 2006 00:29:34 +0200 Message-ID: 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 1154644307 21986 80.91.229.2 (3 Aug 2006 22:31:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 3 Aug 2006 22:31:47 +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 00:31:45 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 1G8ljA-0001uA-VH for ged-emacs-devel@m.gmane.org; Fri, 04 Aug 2006 00:31:41 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G8ljA-0006KX-Bf for ged-emacs-devel@m.gmane.org; Thu, 03 Aug 2006 18:31:40 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1G8liz-0006Jn-Dc for emacs-devel@gnu.org; Thu, 03 Aug 2006 18:31:29 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1G8liw-0006Iu-Ie for emacs-devel@gnu.org; Thu, 03 Aug 2006 18:31:29 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G8liw-0006Ir-Ct for emacs-devel@gnu.org; Thu, 03 Aug 2006 18:31:26 -0400 Original-Received: from [195.41.46.235] (helo=pfepa.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.52) id 1G8lmM-0000jh-Up for emacs-devel@gnu.org; Thu, 03 Aug 2006 18:34:59 -0400 Original-Received: from kfs-l.imdomain.dk.cua.dk (0x503e2644.bynxx3.adsl-dhcp.tele.dk [80.62.38.68]) by pfepa.post.tele.dk (Postfix) with SMTP id ADE91FAC002; Fri, 4 Aug 2006 00:31:03 +0200 (CEST) Original-To: Chong Yidong In-Reply-To: <87fygd97j0.fsf@stupidchicken.com> (Chong Yidong's message of "Thu, 03 Aug 2006 11:13:39 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (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:58069 Archived-At: Chong Yidong writes: >>> Emacs can be made to crash simply by evaluating (sit-for 4) in the scratch >>> buffer and typing C-g before four seconds elapse. >>> >>> It's due to this change: >>> >>> 2006-08-01 Kim F. Storm >>> >>> * process.c (wait_reading_process_output_unwind): New function. >>> Restores waiting_for_user_input_p to saved value. >>> (wait_reading_process_output): Unwind protect waiting_for_user_input_p >>> instead of save/restore old value on stack. >>> >>> Presumably wait_reading_process_output is interrupted before it can do: >>> >>> unbind_to (count, Qnil); >> >> Huh? Is that really possible? >> >> What kind of interrupt can cause unwind_protect forms NOT to be run? > > 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. > > I'll go ahead and revert the 2006-08-01 change. Thanks. But how do we ensure that waiting_for_user_input_p is restored correctly on C-g? Or isn't that necessary? -- Kim F. Storm http://www.cua.dk