[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Gettings LINES and COLUMNS from stderr instead of /dev/tty
From: |
Chet Ramey |
Subject: |
Re: Gettings LINES and COLUMNS from stderr instead of /dev/tty |
Date: |
Mon, 18 Jul 2022 10:26:05 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 |
On 7/16/22 11:18 AM, Martin Schulte wrote:
Hello,
I'm just wondering that bash (reproduced with 5.2-rc1 under Debian 11) seems to
determine LINES and COLUMNS from stderr.
It uses stderr because if the shell is interactive, stderr is guaranteed to
be a terminal, and that's the file descriptor it uses to perform job
control. When it's not interactive, all bets are off, and stderr is usually
a safe default. There's no consistent approach across shells.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/