#397339 openssh-client: Drops SIGWINCH events when 'tail' is running

Package:
openssh-client
Source:
openssh
Description:
secure shell (SSH) client, for secure access to remote machines
Submitter:
Sam Morris
Date:
2021-05-21 22:03:03 UTC
Severity:
normal
#397339#5
Date:
2006-11-06 17:13:22 UTC
From:
To:
This has been bugging me for ages, I've finally got a way to reproduce
it! In an X11 terminal emulator:

 sam@local$ ssh host
 sam@host$ echo $COLUMNS
 80
 sam@host$ tail -n 0 -f /var/log/daemon.log
 [now resize the terminal emulator window]
 sam@host$ echo $COLUMNS
 80

It seems the 'window changed size' event never got to the server.
Compare to doing the same locally:

 sam@local$ tail -n 0 -f /var/log/daemon.log
 [now resize the terminal emulator window]
 sam@local$ echo $COLUMNS
 96

This also seems to happen if 'screen' is run on the remote host instead
of tail.

- -- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (530, 'testing'), (520, 'unstable'), (510, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-1-k7
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)

Versions of packages openssh-client depends on:
ii  adduser  3.99                            Add and remove users and groups
ii  debconf  1.5.8                           Debian configuration management sy
ii  dpkg     1.13.22                         package maintenance system for Deb
ii  libc6    2.3.6.ds1-7                     GNU C Library: Shared libraries
ii  libcomer 1.39+1.40-WIP-2006.10.02+dfsg-2 common error description library
ii  libedit2 2.9.cvs.20050518-2.2            BSD editline and history libraries
ii  libkrb53 1.4.4-3                         MIT Kerberos runtime libraries
ii  libncurs 5.5-5                           Shared libraries for terminal hand
ii  libselin 1.32-2                          SELinux shared libraries
ii  libssl0. 0.9.8c-3                        SSL shared libraries
ii  passwd   1:4.0.18.1-5                    change and administer password and
ii  zlib1g   1:1.2.3-13                      compression library - runtime

openssh-client recommends no packages.

- -- no debconf information
iD8DBQFFT20yshl/216gEHgRAqDGAJwOuc2SzxF3A5C4IHMJNTr3r1fhPgCg0EFT
bfeRpevFa3V5glwvBGt635E=
=qDch
-----END PGP SIGNATURE-----

#397339#10
Date:
2009-04-01 20:48:06 UTC
From:
To:
Hi,

This problem is not related to the "checkwinsize" from bash ?
You can read follow in the bash FAQ [1], Section E11 :

«

E11) If I resize my xterm while another program is running, why doesn't
bash notice the change?

This is another issue that deals with job control.

The kernel maintains a notion of a current terminal process group.
Members of this process group (processes whose process group ID is equal
to the current terminal process group ID) receive terminal-generated
signals like SIGWINCH.  (For more details, see the JOB CONTROL section
of the bash man page.)

If a terminal is resized, the kernel sends SIGWINCH to each member of
the terminal's current process group (the `foreground' process group).

When bash is running with job control enabled, each pipeline (which may
be a single command) is run in its own process group, different from
bash's process group.  This foreground process group receives the
SIGWINCH; bash does not.  Bash has no way of knowing that the terminal
has been resized.

There is a `checkwinsize' option, settable with the `shopt' builtin,
that will cause bash to check the window size and adjust its idea of the
terminal's dimensions each time a process stops or exits and returns
control of the terminal to bash.  Enable it with `shopt -s checkwinsize'.

»

I think you can closed this bug open against openssh-client package.

Cheers.

[1] http://tiswww.case.edu/php/chet/bash/FAQ

#397339#15
Date:
2009-04-01 20:56:06 UTC
From:
To:
Hi

This problem is not related to the "checkwinsize" function from bash ?

You can read this in the bash FAQ [1], Section E11 :

«
E11) If I resize my xterm while another program is running, why doesn't
bash notice the change?

This is another issue that deals with job control.

The kernel maintains a notion of a current terminal process group.
Members of this process group (processes whose process group ID is equal
to the current terminal process group ID) receive terminal-generated
signals like SIGWINCH.  (For more details, see the JOB CONTROL section
of the bash man page.)

If a terminal is resized, the kernel sends SIGWINCH to each member of
the terminal's current process group (the `foreground' process group).

When bash is running with job control enabled, each pipeline (which may
be a single command) is run in its own process group, different from
bash's process group.  This foreground process group receives the
SIGWINCH; bash does not.  Bash has no way of knowing that the terminal
has been resized.

There is a `checkwinsize' option, settable with the `shopt' builtin,
that will cause bash to check the window size and adjust its idea of the
terminal's dimensions each time a process stops or exits and returns
control of the terminal to bash.  Enable it with `shopt -s checkwinsize'.
»

I think you can closed this bug open against openssh-client package.

Cheers.

[1] http://tiswww.case.edu/php/chet/bash/FAQ

#397339#20
Date:
2021-05-21 22:00:13 UTC
From:
To:
Salaam,



Almana Financial Broker, is the home of discerning investors. We offer
independent financial advice and assist our clients to make sound investment
decisions from the array of investment opportunities available. We are
structured to render personalized services to our clients thereby ensuring
safety of capital, adequate returns on investments.



Our investors are ready to provide funding for your business expansion as
Debt/Equity finance. If you require funding, we would be able to partner
with you.



We look forward to your response, thanks and stay safe,



Abdulkader Abdi, CFA

Almana Financial Broker

Dubai, United Arab Emirates