[Top][All Lists]

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

Re: lynx-dev terminal emulators, SIGWINCH (was: Danish translation)

From: Klaus Weide
Subject: Re: lynx-dev terminal emulators, SIGWINCH (was: Danish translation)
Date: Fri, 12 May 2000 11:44:35 -0500 (CDT)

On Wed, 10 May 2000 address@hidden wrote:

> <sigh> In my .profile, and in a wretched case statement which depends
> on OS, SHELL, phase of moon, and barometric pressure,  I have
> various statements such as:
>     rsWINCH() { echo "Caught SIGWINCH">&2;  resize; }
>     trap rsWINCH WINCH

resize updates LINES and COLUMNS variables, but of course that won't
affect a lynx process that's already running at all.

> Bash is pretty good at handling SIGWINCH and setting LINES and COLUMNS.

Also note the following option (in bash2 at least):
  shopt -s checkwinsize

> Other shells do less well.  In some cases I parse the output of
> "stty -a" and set LINES and COLUMNS myself.  On OS/390 I don't
> have a working "resize", but someone just told me of one, and I'm
> trying to compile it as I type.  If there's a standard way to do
> all this, I don't know it.  </sigh>
> And Lynx's behavior is reported to depend on whether you're using
> ncurses or slang or whatever.  My observation is that Lynx as I
> compile it knows only the settings of LINES and COLUMNS when started,
> and is completely insensitive to SIGWINCH.

Completely insensitive?  I've never seen that.  Linux, various versions,
slang or ncurses.

Lynx installs a handler for SIGWINCH.  size_change in LYUtils.c.
That queries the system for the new window size.  The new size is
made know to lynx in variables LYlines and LYcols.  It works for me.

Possible reasons why it might not work:
- the tty doesn't get informed of the size change (stty -a wouldn't show it).
- lynx doesn't get sent a SIGWINCH.
- your curses lib overrides the handler.
- the ioctls by which size_change determines the size don't work on
  your system (or are not implemented).
- Lynx itself might get the new size, while the curses(or slang) lib
  does not become aware of the change (but this would result in different
  behavior, not 'completely insensitive').

Find out which it is, and then you or someone else can try to fix it.
You'll need to do some debugging.


Apparentry it does.


; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden

reply via email to

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