bug-gnu-emacs
[Top][All Lists]
Advanced

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

Leftovers and lost SIGIOs


From: Pontus Skoeld
Subject: Leftovers and lost SIGIOs
Date: 13 Sep 2002 15:20:55 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

        Hi there,

Context:

In GNU Emacs 21.2.1 (sparc-sun-solaris2.7, X toolkit, Xaw3d scroll bars)
 of 2002-04-08 on ida
configured using `configure  --with-png --with-tiff --with-jpeg --with-xpm 
--with-x --prefix=/it/sw/gnu --with-gif --datadir=/it/sw/gnu/share/lib 
--libexecdir=/it/sw/gnu/lib'
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: iso_8859_1
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: nil
  locale-coding-system: iso-latin-1
  default-enable-multibyte-characters: t

(but this goes for 21.1 too). Apart from standard text file/program
code editing, I use Gnus (5.9.0), zenirc (2.1112) and LysKOM (a
conferencing system, version 0.46). I run Emacs in a screen (3.09.08
(FAU) 1-Sep-00) on a quad-CPU (with Solaris 8 really, we use the same
binaries for Solaris 7 and 8) box with very little to do.

I'm having problems with Emacs stopping, not accepting input. Other
systems work OK (I can see in the message line that lyskom works at
least), except for that, the screen doesn't seem to be updated
normally (multiple ^G allows the suspension, and after continuing with
fg, the screen is not updated properly), resizing the window (which
should send SIGWINCH) makes it update correctly.

Sending SIGIO (SIGPOLL seems to be the real "native" thing) to the
emacs process gets things running again.

This never happened to me while using the same software (except for an
earlier Gnus, 5.8.8 IIRC) with Emacs 20.x.

(Warning! Dusty code a head :) )

I *think* I'm bitten by the following documented race condition in
process.c:wait_reading_process_input, or something similar

     /* If frame size has changed or the window is newly mapped,
        redisplay now, before we start to wait.  There is a race
        condition here; if a SIGIO arrives between now and the select
        and indicates that a frame is trashed, the select may block
        displaying a trashed screen.  */

In the same routine, there's also the following code

#if defined(sun) && !defined(USG5_4)
      else if (nfds > 0 && keyboard_bit_set (&Available)
               && interrupt_input)
        /* System sometimes fails to deliver SIGIO.

           David J. Mackenzie says that Emacs doesn't compile under
           Solaris if this code is enabled, thus the USG5_4 in the CPP
           conditional.  "I haven't noticed any ill effects so far.
           If you find a Solaris expert somewhere, they might know
           better." */
        kill (getpid (), SIGIO);
#endif

which I suppose might as well be rewritten with #ifdef SIGIO (and I
notice there is similar code further down, so I'm not that it's at all
necessary). The reason compilation fails is that Solaris inherits the
BROKEN_SIGIO from USG5 (usg5_4.h), causing SIGIO to be undefed.

Another note: keyboard.c seems to duplicate some of the work done by
systty.h (which it includes), so if I haven't misunderstood something
(quite possible), the following should be redundant:

/* Allow m- file to inhibit use of FIONREAD.  */
#ifdef BROKEN_FIONREAD
#undef FIONREAD
#endif

/* We are unable to use interrupts if FIONREAD is not available,
   so flush SIGIO so we won't try.  */
#ifndef FIONREAD
#ifdef SIGIO
#undef SIGIO
#endif
#endif


Unfortunately, this bug occurs very rarely, so whatever the solution,
it will be a very long time before I dare guess that it has helped (I
think there has been an average of two months or so before it occurs).

Anyway, unless anyone has a better idea, I'll try by overriding
USG5_4s BROKEN_SIGIO, undefing it for Solaris and see if that helps
(or if things break).

Regards
        /Pontus



-- 

Pontus Sköld, see <URL:http://soua.net/> for more information.




reply via email to

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