On 3/2/07, Matus UHLAR - fantomas <uhlar@fantomas.sk> wrote:
I'd say that logname detects logged user by checking terminal of stdin file handle...
Yup: $ echo | strace -o'|grep readlink' logname readlink("/proc/self/fd/0", "pipe:[5242235]", 511) = 14 $ strace -o'|grep readlink' logname readlink("/proc/self/fd/0", "/dev/pts/7", 511) = 10 -- Michael A. Marsh http://www.umiacs.umd.edu/~mmarsh http://mamarsh.blogspot.com