🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.epoch.misc
Article #147

Solaris 2.0 patch

#147
From: Scott Stanton
Date: Tue, 11 Aug 1992 17:25
41 lines
1623 bytes
Under Solaris 2.0, Epoch 4.1 will exit spontaneously if it receives two
SIGIO's very close together.  This results from a "feature" of signal().
Signal() does not set the signal mask for the signal it is handling.  Since
it also resets the signal handler back to SIG_DFL, epoch exits on the second
signal.

The following patch will fix the problem by using sigset() instead of
signal().  sigset() behaves like BSD signal().

*** src/keyboard.c	Tue Aug 11 09:54:03 1992
--- src/keyboard.c.new	Tue Aug 11 10:14:20 1992
***************
*** 1468,1478 ****
--- 1468,1480 ----
    extern int select_alarmed;
  #endif
  
+ #ifndef SUNOS_5
  #ifdef USG
    /* USG systems forget handlers when they are used;
       must reestablish each time */
    signal (signo, input_available_signal);
  #endif /* USG */
+ #endif /* SUNOS_5 */
  
  #ifdef BSD4_1
    sigisheld (SIGIO);
***************
*** 2170,2176 ****
--- 2172,2182 ----
  #endif /* HAVE_TERMIO */
  /* Note SIGIO has been undef'd if FIONREAD is missing.  */
  #ifdef SIGIO
+ #ifdef SUNOS_5
+       sigset (SIGIO, input_available_signal);
+ #else /* not SUNOS_5 */
        signal (SIGIO, input_available_signal);
+ #endif /* not SUNOS_5 */
  #endif /* SIGIO */
      }
  
Technical Details
Message-ID: <9208111725.AA01337@ghostwheel.Eng.Sun.COM>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!eng.SUn.COM!Scott.Stanton

Show Full Headers
Complete Article Headers
Newsgroups: gnu.epoch.misc
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!eng.SUn.COM!Scott.Stanton
From: Scott.Stanton@eng.SUn.COM (Scott Stanton)
Subject: Solaris 2.0 patch
Message-ID: <9208111725.AA01337@ghostwheel.Eng.Sun.COM>
Sender: daemon@cis.ohio-state.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Tue, 11 Aug 1992 17:25:22 GMT
Lines: 41