a_main_startup(): isatty() yay fdopen(,"w") nay (A. B., E. E., G. B.)..
The ArchLinux test framework trapped us again. This time Andreas
Baumann (mail AT andreasbaumann DOT cc) discovered, and he and
Erich Eckner (erich DOT eckner AT gmx DOT de) isolated
a segmentation violation[1] in an environment which indeed managed
to create the situation where
isatty(STDIN_FILENO)
is true but
fdopen(fileno(n_stdin), "w")
is not.
This lead to a bug report[2]. It turned out that the
ArchLinux test environment now redirects /dev/console to
STDIN_FILENO[3] to gain. Gaetan Bisson temporarily fixed the
issue by running "make test < /dev/null" and reported the issue.
[1] https://bbs.archlinux32.org/viewtopic.php?pid=486#p486
[2] https://bugs.archlinux.org/task/56124
[3] https://git.archlinux.org/devtools.git/commit/?id=
ddd508efc083fc9beb6f2c96e2537521b31c1e6f
We were not prepared for that, so check the n_tty_fp that results
from the fdopen(3) against NULL before calling setvbuf(3) on it.
All this must vanish in v15.