From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Emacs does not listen on w32 Date: Mon, 14 Apr 2008 16:39:15 -0400 Message-ID: References: <4800D965.9080202@gmail.com> <480208C8.3030401@gnu.org> <480212F7.7090409@gmail.com> <4802249D.2060909@gmail.com> <480271D2.7040304@gmail.com> <4802FD64.1080602@gmail.com> <48038487.3060201@gmail.com> <4803B6A5.4030201@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1208205598 6292 80.91.229.12 (14 Apr 2008 20:39:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 14 Apr 2008 20:39:58 +0000 (UTC) Cc: Juanma Barranquero , Eli Zaretskii , "Lennart Borgman \(gmail\)" , emacs-devel@gnu.org To: Jason Rumney Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 14 22:40:26 2008 connect(): Connection refused Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JlVTM-0002Po-NQ for ged-emacs-devel@m.gmane.org; Mon, 14 Apr 2008 22:40:17 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JlVSi-0001yt-Dw for ged-emacs-devel@m.gmane.org; Mon, 14 Apr 2008 16:39:36 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JlVSb-0001vB-KL for emacs-devel@gnu.org; Mon, 14 Apr 2008 16:39:29 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JlVSa-0001rP-0e for emacs-devel@gnu.org; Mon, 14 Apr 2008 16:39:29 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JlVSZ-0001rC-NW for emacs-devel@gnu.org; Mon, 14 Apr 2008 16:39:27 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JlVSO-00038f-PC; Mon, 14 Apr 2008 16:39:16 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Al0FAEtdA0hMCqsI/2dsb2JhbACBXqle X-IronPort-AV: E=Sophos;i="4.25,656,1199682000"; d="scan'208";a="18495089" Original-Received: from smtp.pppoe.ca (HELO smtp.teksavvy.com) ([65.39.196.238]) by ironport2-out.teksavvy.com with ESMTP; 14 Apr 2008 16:39:15 -0400 Original-Received: from pastel.home ([76.10.171.8]) by smtp.teksavvy.com (Internet Mail Server v1.0) with ESMTP id UYB73915; Mon, 14 Apr 2008 16:39:15 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 664F07F3C; Mon, 14 Apr 2008 16:39:15 -0400 (EDT) In-Reply-To: <4803B6A5.4030201@gnu.org> (Jason Rumney's message of "Mon, 14 Apr 2008 20:55:17 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. 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:95211 Archived-At: >> If you have such an infinite loop within a timer code, then Emacs *is* >> hung, and it seems perfectly fine to let the OS's IsHungAppWindow deal >> with it. > I think Lennart's problem is that we don't let the OS's IsHungAppWindow deal > with it. In Windows, each Window must have its own thread for message > handling. This thread is not blocked by the infinite loop in the Lisp > thread, so as far as Windows is concerned, the message has been received and > dealt with. Oops ;-) > We could change the WM_CLOSE message to do a blocking SendMessage > instead of a non-blocking PostMessage to pass the message on to the > Lisp thread, but if we decide that the solution we want is to let > Emacs be forcibly closed after a timeout, it might be better to have > our own timeout so we can control what message we display to the user > and at least attempt to quit the Lisp blockage and shutdown cleanly > rather than letting the system do it uncleanly. If Emacs is truly hung, it's perfectly fine to shutdown uncleanly. But if C-g works, then it makes sense to do a `quit' so as to interrupt any long running operation. But we'd probably first want to wait a couple seconds and before doing the `quit'. Stefan