emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

C-g doesn't quit (while t) on Solaris 8


From: YAMAMOTO Mitsuharu
Subject: C-g doesn't quit (while t) on Solaris 8
Date: Tue, 28 Apr 2009 11:16:51 +0900
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI)

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
                                address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]