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

Re: SIGINT handling




> 
> maybe SYSV_SIGNALS ought to be true for HPUX systems?  Try adding the lines
> 
> #ifndef	SYSV_SIGNALS
> #define	SYSV_SIGNALS		1
> #endif
> 
> after the line saying
> 
> #if HPUX
> 
> and tell ut how it worked out.
> 
> - Harald

I hate it when I reply to my own e-mail, but I seem to be doing that quite a 
bit lately.  It seems that you were correct, for the most part.  The problem 
was that I was testing the changes by running the new copy of es while sitting 
in my old es shell, so the old shell was catching the signal and exiting.

However, I can't say I really like the behavior of es when SYSV_SIGNALS is 
defined.  When I define it, I get the following behaviour:

      ; ^C<return>

      ;

However, I found that if I left SYSV_SIGNALS undefined in config.h and changed 
catcher() in signal.c to:

/* catcher -- catch (and defer) a signal from the kernel */
static void catcher(int sig) {
#if defined(SYSV_SIGNALS) || defined(HPUX)
	signal(sig, catcher);
#endif

Which now gives me the expected behaviour of:

      ; ^C
      ; ^C
      ;

May I make the suggestion that config.h be changed to contain?

#ifdef HPUX
#ifndef	SYSV_SIGNALS
#define	SYSV_SIGNALS		1
#endif
...
#endif

or that signal.c be changed as described above?

Thanks,
-scott
--
   _/    _/   _/_/_/  _/_/_/_/   _/_/_/  Scott C. Gray (gray@nas.nasa.gov)
  _/_/  _/  _/    _/ _/_/      _/    _/  NASA Ames Research M/S 258-6
 _/  _/_/  _/_/_/_/     _/_/  _/_/_/_/   For PGP public key, send me mail
_/    _/  _/    _/ _/_/_/_/  _/    _/    with subject line of "PGP request".