From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.devel Subject: Re: More info on sporadic OS/X crash Date: Tue, 27 Apr 2004 18:52:15 +0900 Organization: Faculty of Science, Chiba University Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <20040426.221527.198676483.mituharu@math.s.chiba-u.ac.jp> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1083059721 21587 80.91.224.253 (27 Apr 2004 09:55:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 27 Apr 2004 09:55:21 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue Apr 27 11:55:08 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BIPIy-0007XP-00 for ; Tue, 27 Apr 2004 11:55:08 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BIPIy-0003CQ-00 for ; Tue, 27 Apr 2004 11:55:08 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BIPIc-0003lW-SM for emacs-devel@quimby.gnus.org; Tue, 27 Apr 2004 05:54:46 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BIPI2-0003hp-UF for emacs-devel@gnu.org; Tue, 27 Apr 2004 05:54:10 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BIPHW-0003Py-Da for emacs-devel@gnu.org; Tue, 27 Apr 2004 05:54:09 -0400 Original-Received: from [133.82.132.2] (helo=mathmail.math.s.chiba-u.ac.jp) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BIPGI-00033T-QI for emacs-devel@gnu.org; Tue, 27 Apr 2004 05:52:23 -0400 Original-Received: from church.math.s.chiba-u.ac.jp (church [133.82.132.36]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 73BF41A63A6; Tue, 27 Apr 2004 18:52:15 +0900 (JST) Original-To: Steven Tamm In-Reply-To: User-Agent: Wanderlust/2.10.1 (Watching The Wheels) SEMI/1.14.5 (Awara-Onsen) FLIM/1.14.5 (Demachiyanagi) APEL/10.6 Emacs/21.3.50 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:22225 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:22225 >>>>> On Mon, 26 Apr 2004 09:27:52 -0700, Steven Tamm said: > The reason for all of the polling nonsense in the first place is to > deal with runaway processes. > For example, compile this program and run it using (shell-command) or > M-! > #include > int main(int argc, char** argv) { > while (1) > ; > } > If C-g interrupts it, then it still works. With carbon emacs as it is > now, this works. > The other example would be to setup an infinite loop *inside* emacs; > i.e. not as a subprocesses. The simplest being: > (while t t) > Right now, with Carbon Emacs, this causes the beachball of death and > C-g does nothing. This is why the "mac_check_for_quit_char" is > peppered throughout the code; but in this instance it doesn't work. Of > course if you send a SIGINT to the process it works... And (while t > (eval t)), a more realistic example, C-g does work. All the examples you mentioned above can be interrupted with the patched version (also on 10.1). That's not surprising because I just imitated the way of event handling in Solaris (a system without SIGIO) where the event queue is periodically (every 2 seconds by default) polled using the alarm timer. Not only C-g but also window events such as window movement are processed at this timing, so one can move the window during a command loop or waiting for a synchronous process, although it is sluggish. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp