Subject: serial driver close
To: None <>
From: Brad Parker <>
List: netbsd-bugs
Date: 11/15/1993 19:13:03
* There are "#ifdef never"'s in the close code for the com driver and
pty's.  I understand there was a tty reference in the proc which made
it wrong to free the structure and that's why the ifdef where put in.

a side effect is that some of the tty flags never get reset on close
like they should (like the exclusive flag).  I added a "fix" which is
only half working - I'm about to fix it once and for all...

If anyone has fixed this or can shed more light, please let me know.

In the process I ported "ofiles" to NetBSD.  Well, what I thought
would be a 5 minute compile turned into a 2 day job (and, no doubt,
someone's already done this).

In the off chance that no one has, I think I've got it doing
everything, including finding open text files by following the vm chains
back to the pager.  I ripped out all the non-netbsd (i.e. sunos, pyr,
etc...) code because the changes where just too confusing.

(and what a eye-opener that was!  I would have thought the proc's maps
would be a shadow of a "master" map which pages to the file - it
appears I've got this backward - the file pager appears on a shadow of
the proc's vm object; are their mach papers which describe the
relationship between exec & vm objects? just curious)

Were should I put a tar of this - "incoming"? (it's very useful if you
want to find out who's got a file/device/socket open - I've also got a
"comdump" program which dumps the internal state of com driver; no
doubt everyone has these type of little tools - maybe we should pool
them somewhere? just a thought.)

* the gdb-current version of gdb has a bad makefile.  there is a
"param.h" in the SRCS define which should not be there.  if you remove
it compiles fine.  also, it won't do "tbr main" for some reason.