stty and SIGWINCH?

Mike Frysinger vapier at gentoo.org
Thu May 7 19:09:33 UTC 2009


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.
-mike


More information about the busybox mailing list