[ralda at gmx.de: computer phenomena: output of tty applet]
Ralf Friedl
Ralf.Friedl at online.de
Mon Apr 2 10:56:26 UTC 2012
ralda at gmx.de wrote:
>> I think reading /proc/self/fd/1 (we want to test stdout,
>> not stdin or stderr) is the right thing to do for the "tty" command,
>>
> As far as I know is tty specified to test the stdin so fd 0 is the
> right one (fd 2 was a typo of mine, sorry). Currently Busybox and GNU
> tty test stdin and glibc does readlink /proc/self/fd/0 (from strace
> output).
>
According to man tty tests stdin.
Testing stdout is a bad idea, because most of the time, stdout will be
redirected to a pipe or file.
More information about the busybox
mailing list