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: Luke Mewburn <lukem@NetBSD.org>
Date: 01/26/2004 03:40:20
Content-Type: text/plain; charset=us-ascii
On Sat, Jan 24, 2004 at 10:06:58PM -0500, Greg A. Woods wrote:
| [ On Sunday, January 25, 2004 at 00:49:11 (+0100), Christian Biere wrot=
| > Well, flex(3) uses isatty() without checking for a character special
| > device. So, gethostbyname() etc. will trigger a TIOCGETA for
| > /etc/nsswitch.conf.
| Ah, of course. I was a bit quick to give up on looking for a separate
| isatty() call in the (f)lex generated code when I found the fread() call
| since they would both occur at the same position in the ktrace output.
| Adding "%option never-interactive" to the lex source fixes this "proble=
| Lex should probably also be invoked with '-B' as well.
I've added "%option never-interactive" to nslexer.l, which is
sufficient to prevent isatty() from being called.
(Arguably the parser could just be written using fgetln() and
C string parsing instead of yacc & lex. That's a project for
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)
-----END PGP SIGNATURE-----