1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

manual page: correct conditions under which shell is interactive

Only standard error needs to be on a terminal for a
shell to be interactive on init, not all output.

See sh_main() in src/cmd/ksh93/sh/main.c, under
"/* decide whether shell is interactive */".

Also, tcgetattr is not a syscall, so its manual page is
tcgetattr(3), not tcgetattr(2).

(cherry picked from commit 97f8bdb08650fd63f8e125257a86f5e6035fbdfa)
This commit is contained in:
Martijn Dekker 2020-06-06 13:34:54 +02:00
parent d8a2b4fa6d
commit 778b3da79a

View file

@ -7928,8 +7928,8 @@ file descriptor 2.
If the If the
.B \-i .B \-i
option is present or option is present or
if the shell input and output are attached to a terminal (as told by if the shell's standard input and standard error are attached to a terminal (as told by
.IR tcgetattr (2)), .IR tcgetattr (3)),
then this shell is then this shell is
.IR interactive . .IR interactive .
In this case \s-1TERM\s+1 is ignored (so that \f3kill 0\fP In this case \s-1TERM\s+1 is ignored (so that \f3kill 0\fP