On 25 Apr 1998 11:47:34 -0700, Guy Maor <[EMAIL PROTECTED]> said: > > I don't understand how this would work. How do you get the canonical > ttyname from /dev/tty ?
Sorry, you're right of course, that didn't make sense. I've looked at the way libc5's getlogin() works and it uses the first of stdin, stdout and stderr which is hooked up to a tty. If none of them is then it returns NULL. libc6 only checks stdin. dgux (the only other OS I have easy access to) works even if none of those is hooked up to a tty (or if they're hooked up to a different tty), and it still correctly detects if you don't have a utmp slot. (I tested this by using screen to log a tty in and out.) I don't know how it's doing that. The equivalent of lsof shows the process doesn't have any stray fds open on they tty. There's no local equivalent of strace unfortunately. -- Roderick Schertler [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]