bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#24608: 26.0.50; PTY window size initially zero


From: Lars Ingebrigtsen
Subject: bug#24608: 26.0.50; PTY window size initially zero
Date: Mon, 30 Nov 2020 13:14:28 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]