diff options
Diffstat (limited to 'signal.c')
-rw-r--r-- | signal.c | 36 |
1 files changed, 21 insertions, 15 deletions
@@ -78,22 +78,16 @@ stop(type) } #endif +#undef SIG_LESSWINDOW #ifdef SIGWINCH -/* - * "Window" change handler - */ - /* ARGSUSED*/ - public RETSIGTYPE -winch(type) - int type; -{ - LSIGNAL(SIGWINCH, winch); - sigs |= S_WINCH; - if (reading) - intread(); -} +#define SIG_LESSWINDOW SIGWINCH #else #ifdef SIGWIND +#define SIG_LESSWINDOW SIGWIND +#endif +#endif + +#ifdef SIG_LESSWINDOW /* * "Window" change handler */ @@ -102,13 +96,12 @@ winch(type) winch(type) int type; { - LSIGNAL(SIGWIND, winch); + LSIGNAL(SIG_LESSWINDOW, winch); sigs |= S_WINCH; if (reading) intread(); } #endif -#endif #if MSDOS_COMPILER==WIN32C /* @@ -133,6 +126,13 @@ wbreak_handler(dwCtrlType) } #endif + static RETSIGTYPE +terminate(type) + int type; +{ + quit(15); +} + /* * Set up the signal handlers. */ @@ -161,6 +161,9 @@ init_signals(on) #ifdef SIGQUIT (void) LSIGNAL(SIGQUIT, SIG_IGN); #endif +#ifdef SIGTERM + (void) LSIGNAL(SIGTERM, terminate); +#endif } else { /* @@ -182,6 +185,9 @@ init_signals(on) #ifdef SIGQUIT (void) LSIGNAL(SIGQUIT, SIG_DFL); #endif +#ifdef SIGTERM + (void) LSIGNAL(SIGTERM, SIG_DFL); +#endif } } |