From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jan =?UTF-8?Q?Dj=C3=A4rv?= Newsgroups: gmane.emacs.bugs Subject: bug#8869: Unjustified selection time-out Date: Mon, 20 Jun 2011 08:27:18 +0200 Message-ID: <4DFEE846.8080601@swipnet.se> References: <4DF955AF.6080107@harpegolden.net> <4DFA2303.2070304@harpegolden.net> <4DFB98D8.5030204@harpegolden.net> <871uyq23w3.fsf@stupidchicken.com> <4DFDCEF0.5060509@swipnet.se> <3E459F31-964C-4C5F-993F-2EFF2710893E@swipnet.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1308551307 18625 80.91.229.12 (20 Jun 2011 06:28:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 20 Jun 2011 06:28:27 +0000 (UTC) Cc: "8869@debbugs.gnu.org" <8869@debbugs.gnu.org> To: Chong Yidong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 20 08:28:23 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QYXyA-0000N9-Rl for geb-bug-gnu-emacs@m.gmane.org; Mon, 20 Jun 2011 08:28:23 +0200 Original-Received: from localhost ([::1]:54810 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QYXy9-0004UC-Vr for geb-bug-gnu-emacs@m.gmane.org; Mon, 20 Jun 2011 02:28:22 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:39458) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QYXxs-0004TU-Lu for bug-gnu-emacs@gnu.org; Mon, 20 Jun 2011 02:28:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QYXxr-000706-00 for bug-gnu-emacs@gnu.org; Mon, 20 Jun 2011 02:28:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34189) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QYXxq-000702-Oh for bug-gnu-emacs@gnu.org; Mon, 20 Jun 2011 02:28:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QYXxp-0006m5-U7; Mon, 20 Jun 2011 02:28:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jan =?UTF-8?Q?Dj=C3=A4rv?= Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Jun 2011 06:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8869 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 8869-submit@debbugs.gnu.org id=B8869.130855124826002 (code B ref 8869); Mon, 20 Jun 2011 06:28:01 +0000 Original-Received: (at 8869) by debbugs.gnu.org; 20 Jun 2011 06:27:28 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QYXxH-0006lL-Fx for submit@debbugs.gnu.org; Mon, 20 Jun 2011 02:27:27 -0400 Original-Received: from smtprelay-b12.telenor.se ([62.127.194.21]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QYXxF-0006l9-L1 for 8869@debbugs.gnu.org; Mon, 20 Jun 2011 02:27:26 -0400 Original-Received: from ipb3.telenor.se (ipb3.telenor.se [195.54.127.166]) by smtprelay-b12.telenor.se (Postfix) with ESMTP id D3BFEC4DE for <8869@debbugs.gnu.org>; Mon, 20 Jun 2011 08:27:19 +0200 (CEST) X-SENDER-IP: [85.225.45.100] X-LISTENER: [smtp.bredband.net] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApZmAOHn/k1V4S1kPGdsb2JhbABThEmESJ1JCwEBAQE3Moh1rTOQA4Erg3WBCgSWPosj X-IronPort-AV: E=Sophos;i="4.65,391,1304287200"; d="scan'208";a="22650862" Original-Received: from c-642de155.25-1-64736c10.cust.bredbandsbolaget.se (HELO coolsville.localdomain) ([85.225.45.100]) by ipb3.telenor.se with ESMTP; 20 Jun 2011 08:27:19 +0200 Original-Received: from [172.20.199.13] (zeplin [172.20.199.13]) by coolsville.localdomain (Postfix) with ESMTPSA id ED92D7FA05A; Mon, 20 Jun 2011 08:27:18 +0200 (CEST) User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; sv-SE; rv:1.9.2.18) Gecko/20110613 Thunderbird/3.1.11 In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 20 Jun 2011 02:28:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:47341 Archived-At: Chong Yidong skrev 2011-06-19 23.13: > Jan Dj=C3=A4rv writes: > >> Maybe it will, but it is a bad solution (busy wait). It also does not >> solve the error in process.c. That error may very well be responsible >> for the hang Emacs sometimes does when it should be saving the session >> and exit. > > Hmm, I'm not sure I understand what you're saying. My impression is > that Emacs is getting stuck on wait_reading_process_output's select() > call, which doesn't exit to do the necessary X event processing until > some user input is available. If that's the case, then the problem is > calling select() with a long timeout. I disagree. The problem is not calling select with a ong timeout, the pr= oblem=20 is not checking if there is queued events and handling them before enteri= ng=20 select. Checking Emacs as I run it, select is usually enetered with a timeout bet= weeen=20 10 and 15 seconds, so the potential for this happening is great. Any solution to a problem that increases frequency of polling is just=20 fundamentally wrong. It leads to increased CPU usage, and since code is=20 executed often, it can not be swapped out. Also, debugging such code is h= ard=20 because breakpoints can't be used reliably since the code depends on busy= wait=20 or polling. Please do not commit that patch. Jan D.