#1018958 coreutils: stty default output doesn't actually show "deviations from stty sane" for c_cc[VTIME] and c_cc[VMIN]

Package:
coreutils
Source:
coreutils
Description:
GNU core utilities
Submitter:
наб
Date:
2023-01-28 08:21:03 UTC
Severity:
normal
#1018958#5
Date:
2022-09-02 14:53:49 UTC
From:
To:
Dear Maintainer,

Quoth stty(1):
-- >8 --
Without arguments, prints baud rate, line discipline, and deviations
from stty sane.
-- >8 --

Under Linux:
-- >8 --
$ grep -e TIME -e MIN /usr/include/x86_64-linux-gnu/sys/ttydefaults.h
#define CMIN            1
#define CTIME           0
        CDISCARD, CMIN, CTIME,  CSTATUS, _POSIX_VDISABLE
$ grep -e TIME -e MIN /usr/include/x86_64-linux-gnu/bits/termios-c_cc.h
#define VTIME 5
#define VMIN 6
-- >8 --

Why, then:
-- >8 --
$ stty time 99 min 120
$ stty
speed 38400 baud; line = 0;
-brkint -imaxbel
$ stty -a | grep time
...; discard = ^O; min = 120; time = 99;
$ stty -g
500:5:bf:8a3b:3:1c:7f:15:4:63:78:0:11:13:1a:0:12:f:17:16:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0
-- >8 --

Given, that, quoth stty(1):
-- >8 --
sane  ..., all special characters to their default values
-- >8 --
and
-- >8 --
$ stty time 99 min 120
$ stty sane
$ stty -a | grep time
...; discard = ^O; min = 1; time = 0;
$ stty -g
2502:5:bf:8a3b:3:1c:7f:15:4:0:1:0:11:13:1a:0:12:f:17:16:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0
-- >8 --
?

наб

#1018958#8
Date:
2023-01-28 08:17:16 UTC
From:
To:
Another setting that stty without arguments doesn't show is ixon:

$ sh -c 'stty sane; stty ixon; stty; stty -ixon; stty; stty sane'
speed 38400 baud; line = 0;
speed 38400 baud; line = 0;