public inbox for developer@lists.illumos.org (since 2011-08)
 help / color / mirror / Atom feed
* [REVIEW] 16529 TIOCGWINSZ returns EINVAL on a freshly-created pty
@ 2024-05-06 17:57 Bill Sommerfeld
  0 siblings, 0 replies; only message in thread
From: Bill Sommerfeld @ 2024-05-06 17:57 UTC (permalink / raw)
  To: developer

Issue: https://www.illumos.org/issues/16529
CR: https://code.illumos.org/c/illumos-gate/+/3463
Diff: 
https://code.illumos.org/~diff/66894d04f83f841e04044ec7116074b17c7651fd

The TIOCGWINSZ/TIOCSWINSZ tty ioctls are used to fetch and store the
terminal emulator window size (a "struct winsize", which holds the
window dimensions in both pixels and characters) .  Our implementation
of TIOCGWINSZ fails with EINVAL if all four dimensions are zero, which
means that a TIOCGWINSZ on a freshly-allocated pty returns EINVAL.

Other implementations just return zeros to userspace, and there is an
Python API for getting and setting the the window size which fails on
Illumos unless some other program sets at least one of the four
dimensions to non-zero first.  Python doesn't let you set or fetch the
pixel sizes, but it doesn't want to clobber them, either, so it won't
let you set the character sizes unless a prior get succeeds.

We should change our behavior to match what others are doing, and we
can do this with a simple change to ptem.c

Thanks in advance for your review.

					- Bill





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-05-06 17:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-06 17:57 [REVIEW] 16529 TIOCGWINSZ returns EINVAL on a freshly-created pty Bill Sommerfeld

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).