multiples of tty streams modules cause weirdness
If libc believes itself to be in an xpg4 process, and it a pts device is opened, libc uses push_modules to push the tty streams modules.
In cases where a process doesn't expect this, this leaves you with multiples of the streams modules, like so:
In this case, we are no longer able to get the terminal size information until modules are popped such that there is only one ptem on the stack.
Either the streams modules should not screw things if they're duplicated and stacked like this, or libc should be smart about not pushing them when they're already present. Or something.
See also #9041
Updated by Andy Fiddaman over 5 years ago
Testing proposed patch from above review link.
Using unpatched tmux compiled with gcc 7 and linked against xpg6-values.o.
bloody% strconf ttcompat ldterm ptem ldterm ptem ttcompat ldterm ptem pts
bloody% strconf ttcompat ldterm ptem pts
Updated by Electric Monk over 5 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
commit 6cfa0a7079eb1baa0a742f1e4def7cdabc8dcdab Author: Andy Fiddaman <firstname.lastname@example.org> Date: 2018-06-04T08:34:36.000Z 9042 multiples of tty streams modules cause weirdness Reviewed by: Randy Fishel <email@example.com> Reviewed by: Carlos Neira <firstname.lastname@example.org> Approved by: Hans Rosenfeld <email@example.com>