home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.bsd
- Path: sparky!uunet!news.univie.ac.at!news.tu-graz.ac.at!fstgds01!chmr
- From: chmr@fstgds01 (Christoph Robitschko)
- Subject: Re: Logical console
- Message-ID: <1993Jan5.200430.26826@news.tu-graz.ac.at>
- Sender: news@news.tu-graz.ac.at (USENET News System)
- Nntp-Posting-Host: fstgds01
- Organization: Technical University of Graz, Austria
- X-Newsreader: TIN [version 1.1 PL7]
- References: <8091@skye.ed.ac.uk>
- Date: Tue, 5 Jan 93 20:04:30 GMT
- Lines: 41
-
- In article <8091@skye.ed.ac.uk> Richard Tobin (richard@aiai.ed.ac.uk) wrote:
- :> When I log in, the pc screen (/dev/vga) is the console. If I do
- :>
- :> echo hi >/dev/vga
- :>
- :> this hangs - I never get a shell prompt back.
- :>
- :> If before the echo, I do
- :>
- :> sleep 9999 >/dev/vga &
- :>
- :> then the echo doesn't hang.
- :>
- :> In the first case, when echo exits, the kernel calls pcclose(); in the
- :> second case it doesn't. I conjecture that this is the cause of the
- :> problem.
- :>
- :> pcclose() is called because no process except echo has /dev/vga open
- :> directly, though the shell has it open indirectly through the console
- :> device. It seems to me that opening a device indirectly (as the
- :> console) should increment its reference count so that this doesn't
- :> happen. Alternatively the function (vcount() I think) which takes
- :> account of aliasing of devices through multiple inodes with the same
- :> major/minor device number could take account of aliasing through the
- :> console.
- :>
- :> Have I understood this correctly?
-
- I think so.
- I don't know if vcount() could solve the problem, but there is another
- solution to this problem, which could also solve the problem of the
- hanging console after a X-Server crash:
- Why not create an additional minor device to the pccons device, which
- switches to graphics mode when opened, and back when closed. Then there
- would be no need to ever use the console through devices other than
- /dev/console (except for the X server, of course !).
- I would try it myself, but I don't have room and time for a XFree compile 8-(.
-
- :> -- Richard
-
- Christoph
-