From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.devel Subject: C-g doesn't quit (while t) on Solaris 8 Date: Tue, 28 Apr 2009 11:16:51 +0900 Organization: Faculty of Science, Chiba University Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1240885041 22336 80.91.229.12 (28 Apr 2009 02:17:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Apr 2009 02:17:21 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 28 04:17:12 2009 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 1Lycsi-00060V-8j for ged-emacs-devel@m.gmane.org; Tue, 28 Apr 2009 04:17:12 +0200 Original-Received: from localhost ([127.0.0.1]:44739 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lycsh-0002it-It for ged-emacs-devel@m.gmane.org; Mon, 27 Apr 2009 22:17:11 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lycsb-0002ga-Be for emacs-devel@gnu.org; Mon, 27 Apr 2009 22:17:05 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LycsW-0002aL-Go for emacs-devel@gnu.org; Mon, 27 Apr 2009 22:17:04 -0400 Original-Received: from [199.232.76.173] (port=58899 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LycsW-0002aB-At for emacs-devel@gnu.org; Mon, 27 Apr 2009 22:17:00 -0400 Original-Received: from ntp.math.s.chiba-u.ac.jp ([133.82.132.2]:52671 helo=mathmail.math.s.chiba-u.ac.jp) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LycsV-0004hR-Ki for emacs-devel@gnu.org; Mon, 27 Apr 2009 22:17:00 -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 2A0562C44 for ; Tue, 28 Apr 2009 11:16:52 +0900 (JST) User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) X-detected-operating-system: by monty-python.gnu.org: NetBSD 3.0 (DF) 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:110502 Archived-At: As Solaris 8 doesn't have SIGIO, Emacs uses polling with SIGALRM so it can quit even a tight loop. But Emacs 23 on Solaris 8 with X11 doesn't quit the evaluation of (while t). It used to work on Emacs 22. The difference between two versions is in a condition (see XXX in the comment in line 2253) in start_polling (keyboard.c). 2249 void 2250 start_polling () 2251 { 2252 #ifdef POLL_FOR_INPUT 2253 /* XXX This condition was (read_socket_hook && !interrupt_input), 2254 but read_socket_hook is not global anymore. Let's pretend that 2255 it's always set. */ 2256 if (!interrupt_input) 2257 { 2258 /* Turn alarm handling on unconditionally. It might have 2259 been turned off in process.c. */ 2260 turn_on_atimers (1); 2261 2262 /* If poll timer doesn't exist, are we need one with 2263 a different interval, start a new one. */ 2264 if (poll_timer == NULL 2265 || EMACS_SECS (poll_timer->interval) != polling_period) 2266 { 2267 EMACS_TIME interval; 2268 2269 if (poll_timer) 2270 cancel_atimer (poll_timer); 2271 2272 EMACS_SET_SECS_USECS (interval, polling_period, 0); 2273 poll_timer = start_atimer (ATIMER_CONTINUOUS, interval, 2274 poll_for_input, NULL); 2275 } 2276 2277 /* Let the timer's callback function poll for input 2278 if this becomes zero. */ 2279 --poll_suppress_count; 2280 } 2281 #endif 2282 } This function is called from init_keyboard both at the dump stage and in the dumped executable: 11610 void 11611 init_keyboard () 11612 { 11683 #ifdef POLL_FOR_INPUT 11684 poll_suppress_count = 1; 11685 start_polling (); 11686 #endif 11687 } In Emacs 22, the call to start_polling doesn't do anything at the dump stage because read_socket_hook is not set yet. But In Emacs 23, it starts a timer even at the dump stage and sets the variable poll_timer to non-NULL, and that prevents the dumped executable from setting an effective poll_timer (line 2264). Perhaps we should suppress the call to start_polling at the dump stage? YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp