From: Lars Ingebrigtsen <larsi@gnus.org>
To: Helmut Eller <eller.helmut@gmail.com>
Cc: 24608@debbugs.gnu.org
Subject: bug#24608: 26.0.50; PTY window size initially zero
Date: Mon, 30 Nov 2020 13:14:28 +0100 [thread overview]
Message-ID: <87sg8r82jf.fsf@gnus.org> (raw)
In-Reply-To: <m2pongsf2a.fsf@gmail.com> (Helmut Eller's message of "Tue, 04 Oct 2016 10:18:05 +0200")
Helmut Eller <eller.helmut@gmail.com> writes:
> When a subprocess tries to read the window size of the tty with the
> TIOCGWINSZ ioctl the result is initially zero. This causes problems for
> programs that aren't prepared for zero sized windows. It would be
> better if the size would be initialized correctly or at least not be
> zero.
>
> To reproduce the situation compile the attached C program and execute
> Emacs like this:
> emacs -Q -nw -f shell \
> --eval '(progn (sit-for 1) (insert "getwinsize") (comint-send-input))' \
> --eval '(progn (sit-for 1) (insert "getwinsize") (comint-send-input))' \
> --eval '(progn (sit-for 1) (delete-other-windows) (insert "getwinsize") (comint-send-input))'
>
> After that, the *shell* buffer look like so:
>
> helmut@caladan:/tmp> getwinsize
> Window size: 0 columns 0 rows
> helmut@caladan:/tmp> getwinsize
> Window size: 0 columns 0 rows
> helmut@caladan:/tmp> getwinsize
> Window size: 80 columns 21 rows
> helmut@caladan:/tmp>
(This bug report unfortunately got no response at the time.)
I'm not getting exactly this (in Emacs 27):
arsi@xo:~/src/emacs/trunk$ /tmp/getwinsize
/tmp/getwinsize
/tmp/getwinsize
larsi@xo:~/src/emacs/trunk$ larsi@xo:~/src/emacs/trunk$ Window size: 0 columns \
0 rows
larsi@xo:~/src/emacs/trunk$ Window size: 0 columns 0 rows
larsi@xo:~/src/emacs/trunk$ Window size: 0 columns 0 rows
But it's still wrong. However, in Emacs 28, I'm getting:
/tmp/getwinsize
/tmp/getwinsize
/tmp/getwinsize
larsi@xo:~/src/emacs/trunk$ larsi@xo:~/src/emacs/trunk$ larsi@xo:~/src/emacs/tr\
unk$ Window size: 79 columns 21 rows
larsi@xo:~/src/emacs/trunk$ Window size: 79 columns 21 rows
larsi@xo:~/src/emacs/trunk$ Window size: 79 columns 21 rows
So I'm going to go ahead and guess that this has been fixed now, and I'm
closing this bug report. If this is still an issue, please respond to
the debbugs address and we'll reopen.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
prev parent reply other threads:[~2020-11-30 12:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-04 8:18 bug#24608: 26.0.50; PTY window size initially zero Helmut Eller
2020-11-30 12:14 ` Lars Ingebrigtsen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sg8r82jf.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=24608@debbugs.gnu.org \
--cc=eller.helmut@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).