Subject: Re: files left open across exec?
To: None <current-users@netbsd.org>
From: Wolfgang Rupprecht <wolfgang+gnus20011019T083540@wsrcc.com>
List: current-users
Date: 10/19/2001 08:47:56
atatat@atatdot.net (Andrew Brown) writes:
> >This is from netbsd-current as of a few minutes ago.  This particular
> >named was restarted from bash running under xterm.  Notice fd 5,6,7.
> >Surely named is not going to try to render true-type-font to some
> >random udp port. ;-)
> 
> try a different shell?

I don't believe this is an issue with bash, although it could well be
an issue with xterm.  (Xterm has no business exporting the *.ttf open
files to bash across the exec.)

Whatever caused this changed happened between Jul 9th and Oct 18th.

From a world build on Jul 9th:

$ lsof -c bash
COMMAND  PID     USER   FD   TYPE DEVICE SIZE/OFF   NODE NAME
bash    4112 wolfgang  cwd   VDIR  32,32     8192 839273 /amd/capsicum/u/wolfgang
bash    4112 wolfgang  txt   VREG    4,6   424468 357244 /u/pkg/bin/bash
bash    4112 wolfgang  txt   VREG    4,5    44597  19923 /usr/libexec/ld.elf_so
bash    4112 wolfgang  txt   VREG    4,5     9254    124 /usr/lib/libtermcap.so.0.4
bash    4112 wolfgang  txt   VREG    4,6    56825 571662 /u/pkg/lib/libintl.so.1.0
bash    4112 wolfgang  txt   VREG    4,5   681773    131 /usr/lib/libc.so.12.79
bash    4112 wolfgang    0u  VCHR    5,1   0t2940    188 /dev/ttyp1
bash    4112 wolfgang    1u  VCHR    5,1   0t2940    188 /dev/ttyp1
bash    4112 wolfgang    2u  VCHR    5,1   0t2940    188 /dev/ttyp1
bash    4112 wolfgang   63u  VCHR    5,1   0t2940    188 /dev/ttyp1

From a world build on Oct 18th:

$ lsof -c bash
COMMAND  PID     USER   FD   TYPE DEVICE SIZE/OFF    NODE NAME
bash    3584 wolfgang  cwd   VDIR    0,6     8192  839273 /u/wolfgang
bash    3584 wolfgang  txt   VREG    0,6   424468  764533 /u/pkg/bin/bash
bash    3584 wolfgang  txt   VREG    0,5    45354   15407 /usr/libexec/ld.elf_so
bash    3584 wolfgang  txt   VREG    0,5     9254   48379 /usr/lib/libtermcap.so.0.4
bash    3584 wolfgang  txt   VREG    0,6    56825  882939 /u/pkg/lib/libintl.so.1.0
bash    3584 wolfgang  txt   VREG    0,5   681773   48015 /usr/lib/libc.so.12.79
bash    3584 wolfgang    0u  VCHR    5,3   0t4136     221 /dev/ttyp3
bash    3584 wolfgang    1u  VCHR    5,3   0t4136     221 /dev/ttyp3
bash    3584 wolfgang    2u  VCHR    5,3   0t4136     221 /dev/ttyp3
bash    3584 wolfgang    5r  VREG    0,6    86048  271834 /u/X11R6.4/lib/X11/fonts/truetype/cour.ttf
bash    3584 wolfgang    6r  VREG    0,6     1951  271809 /u/X11R6.4/lib/X11/fonts/truetype/XftConfig
bash    3584 wolfgang    7r  VREG    0,6    94140  271835 /u/X11R6.4/lib/X11/fonts/truetype/courbd.ttf
bash    3584 wolfgang   63u  VCHR    5,3   0t4136     221 /dev/ttyp3

I'm also seeing other weirdnesses with yesterday's world.  The recent
Mozilla completely refuses to access outside http servers, but will
access local ones (eg. localhost:80).  This happens with old pre-Oct
18 binaries and recompiled binaries.  Something is not well in
-current...

-wolfgang
-- 
       Wolfgang Rupprecht <wolfgang+gnus@dailyplanet.wsrcc.com>
		    http://www.wsrcc.com/wolfgang/
Coming soon: GPS mapping tools for Open Systems. http://www.gnomad-mapping.com/