Re: [PATCH 0/5] SIGWINCH problem with terminal apps still alive

From: Alan Cox
Date: Thu Oct 16 2008 - 06:53:04 EST

> and signal generated. In case of pty ioctl() on slave side it just sets
> pty size variables, generates SIGWINCH, but terminal is not changed so
> a terminal app will go crazy now. I propose changes which lead to more
> consistent handling:

It sets the tty and pty side variables.

> Now if xterm resizes itself then a program on slave gets its signal
> but if this program sets terminal sizes by ioctl then only xterm gets
> the SIGWINCH signal and could read desired sizes by ioctl and then
> resize itself and set valid sizes on slave side by another ioctl() call.
> If it not supports this method then there will be no changes on slave
> side. I think that it is more proper so on the slave side we will see
> always actual values and if terminal resizes we will get SIGWINCH.

The current and historic behaviour is I believe correct and matches other

Your patch doesn't really seem to make a lot of sense either. You add pty
special cases in places they are not needed and you pass various extra
arguments to functions that don't need them.

I did actually have a glance at the pty signalling question a couple of
days ago while further tidying up the default resize logic - see the
ttydev tree. I'm cautious about changing the signal behaviour however
without having a hard look to see whether any other Unixen has that
behaviour currently as we may risk breaking stuff.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at