Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: trapping WINCH fails in 3.0.3-test4



Roderick Schertler wrote:
> I can't get a trap on SIGWINCH to work in 3.0.3-test4:
> 
>     e:1% zsh-3.0.3-test4 -f
>     eeyore% TRAPWINCH() { echo here }
>     eeyore% kill -WINCH $$
>     eeyore% _

I don't see why it shouldn't be made to work; it's probably just an
oversight (except that the whole trap mechanism needs altering to run
the traps somewhere else, but that doesn't alter the present problem).
The proper place for the trap is probably after adjustwinsize(), so
that the function gets the new values for $LINES and $COLUMNS.

*** Src/signals.c.win	Tue Feb 18 17:29:59 1997
--- Src/signals.c	Tue Apr 29 09:26:17 1997
***************
*** 489,494 ****
--- 489,496 ----
  
      case SIGWINCH:
          adjustwinsize();  /* check window size and adjust */
+ 	if (sigtrapped[SIGWINCH])
+ 	    dotrap(SIGWINCH);
          break;
  
      case SIGALRM:

-- 
Peter Stephenson <pws@xxxxxx>       Tel: +49 33762 77366
WWW:  http://www.ifh.de/~pws/       Fax: +49 33762 77413
Deutsches Elektronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen
DESY-IfH, 15735 Zeuthen, Germany.



Messages sorted by: Reverse Date, Date, Thread, Author