Return to BSD News archive
Newsgroups: comp.os.386bsd.bugs Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!doc.ic.ac.uk!pipex!uknet!mcsun!sun4nl!eur.nl!pk From: pk@cs.few.eur.nl (Paul Kranenburg) Subject: Re: Patch for hanging console Message-ID: <1993Apr19.224208.27016@cs.few.eur.nl> Sender: news@cs.few.eur.nl Reply-To: pk@cs.few.eur.nl Organization: Erasmus University Rotterdam References: <1qttvcINNno2@fstgds01.tu-graz.ac.at> Date: Mon, 19 Apr 1993 22:42:08 GMT Lines: 34 In <1qttvcINNno2@fstgds01.tu-graz.ac.at> chmr@edvz.tu-graz.ac.at (Christoph Robitschko) writes: >This patch fixes the hanging console problem. The problem was that the console >can be accessed through two drivers (major device numbers), so the >reference count on the vnode does not represent the actual use count >of the console device. Because of this, the device close routine can be >called even though the device is still open through the other major number, >such hanging the device. >To see the problem: > [...] >My fix creates a temporary vnode for the device where the console is >mapped to, and keeps a reference on it as long as /dev/console is open. It seems a rather convoluted solution to this particular problem. This whole "/dev/vga" business was a quick hack in the first place, but since there are a whole bunch of XFree servers out there based on it, I'm afraid w're stuck with it for the remaining lifetime of the .1 release. The terminal-, keyboard translation- and framebuffer-functions of the current pccons driver must be decoupled, providing separate interfaces for each (say, /dev/kbd, /dev/fb, etc). Meanwhile, since the X server only requires one ioctl() function and the device map routine, things should work fine by making another entry in cdevsw for just this purpose having only these two entries and setting the others to 'nulldev' or 'nodev' as appropriate. Call this entry '/dev/vga', the original /dev/vga (dev 12,0) can disappear from /dev. -pk -pk