stty and SIGWINCH?

Joakim Tjernlund joakim.tjernlund at transmode.se
Thu May 7 20:27:39 UTC 2009


Mike Frysinger <vapier at gentoo.org> wrote on 07/05/2009 21:09:33:
>
> On Thursday 07 May 2009 14:56:40 Joakim Tjernlund wrote:
> > > Mike Frysinger <vapier at gentoo.org> wrote on 07/05/2009 20:24:29:
> > > > On Thursday 07 May 2009 09:00:41 Joakim Tjernlund wrote:
> > > > > Using BB 1.12.1 and I have noticed that if I change rows and cols
> > > > > with stty,
> > > > > bash does not notice this change.
> > > > > Should not stty send a SIGWINCH to the shell to inform it of the
> > > > > changes?
> > > >
> > > > i'm pretty sure it is not stty's business to locate processes whose
> > > > ctty is the tty it modified and send a SIGWINCH to them.  sounds more
> > > > like it's the job of the tty layer in the kernel.
> > >
> > > hmm, how is this supposed to work. If it is the kernels job to
> > > send them, are recent kernels then broken?
> > > If I telnet into the board and then resize my x-terminal, all
> > > works as it should. I assumed the telnet daemon made sure to
> > > send the SIGWINCH but I havn't checked.
> > >
> > > Perhaps the serial console is a special case that dosen't get SIGWINCH?
> >
> > So I did a small test, telnet into the board, do
> >   stty -F /dev/ttyS0 cols 100
> > this actually changes bash to 100 cols
> > so I guess the kernel is doing something here.
> > However, doing the stty dance above in the serial console does
> > not have an effect on bash.
>
> your serial terminal (minicom/kermit/whatever) could be the thing screwing up
> as well.  there is no way to transmit the signal from the board over the UART
> to the serial terminal.  serial consoles have always been problematic
> regardless of busybox ... same issue can be seen on a system where busybox
> doesnt exist as a replacement.

ehh, no. The serial terminal isn't involved at all. The signal
should only travel from the kernel up to the local shell running on
top of ttyS0

Of coarse I must also adjust the serial terminal afterwards, but that is
something I have to do manually.

I don't belive that this problem has anything to do with bb anymore.

 Jocke



More information about the busybox mailing list