Subject: Re: Vi still can't remove its own vi-recover files from NFS /var/tmp
To: NetBSD-current Discussion List <current-users@NetBSD.ORG>
From: Greg A. Woods <woods@weird.com>
List: current-users
Date: 01/23/2004 14:39:25
[ On Friday, January 23, 2004 at 10:42:18 (+0100), Christian Biere wrote: ]
> Subject: Re: Vi still can't remove its own vi-recover files from NFS /var/tmp
>
> To answer at least the question WRT TIOCGETA. To determine whether
> a file descriptor is a tty you can use the function isatty() which
> doesn't do anything but "tcgetattr(fd, &term_struct)" and if that
> fails, it returns false. As you've already guessed the latter
> function isn't nothing else but a ioctl() with TIOCGETA. So, isatty()
> is used by stdio functions and that explains the noise in trace logs.
Ah, of course, isatty(). OK, well that could make some sense -- though
I don't see any (obvious, i.e. with fgrep) isatty() call in the vi or
libc/stdio source (though I'm looking in my netbsd-1-6 tree, not in the
now long gone tree for the version I ktraced), nor is there any call to
tcgetattr() in either vi or libc/stdio.
--
Greg A. Woods
+1 416 218-0098 VE3TCP RoboHack <woods@robohack.ca>
Planix, Inc. <woods@planix.com> Secrets of the Weird <woods@weird.com>