home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / unix / bsd / 10931 < prev    next >
Encoding:
Text File  |  1993-01-05  |  2.0 KB  |  55 lines

  1. Newsgroups: comp.unix.bsd
  2. Path: sparky!uunet!news.univie.ac.at!news.tu-graz.ac.at!fstgds01!chmr
  3. From: chmr@fstgds01 (Christoph Robitschko)
  4. Subject: Re: Logical console
  5. Message-ID: <1993Jan5.200430.26826@news.tu-graz.ac.at>
  6. Sender: news@news.tu-graz.ac.at (USENET News System)
  7. Nntp-Posting-Host: fstgds01
  8. Organization: Technical University of Graz, Austria
  9. X-Newsreader: TIN [version 1.1 PL7]
  10. References: <8091@skye.ed.ac.uk>
  11. Date: Tue, 5 Jan 93 20:04:30 GMT
  12. Lines: 41
  13.  
  14. In article <8091@skye.ed.ac.uk> Richard Tobin (richard@aiai.ed.ac.uk) wrote:
  15. :> When I log in, the pc screen (/dev/vga) is the console.  If I do
  16. :> 
  17. :>   echo hi >/dev/vga
  18. :> 
  19. :> this hangs - I never get a shell prompt back.
  20. :> 
  21. :> If before the echo, I do
  22. :> 
  23. :>   sleep 9999 >/dev/vga &
  24. :> 
  25. :> then the echo doesn't hang.
  26. :> 
  27. :> In the first case, when echo exits, the kernel calls pcclose(); in the
  28. :> second case it doesn't.  I conjecture that this is the cause of the
  29. :> problem.
  30. :> 
  31. :> pcclose() is called because no process except echo has /dev/vga open
  32. :> directly, though the shell has it open indirectly through the console
  33. :> device.  It seems to me that opening a device indirectly (as the
  34. :> console) should increment its reference count so that this doesn't
  35. :> happen.  Alternatively the function (vcount() I think) which takes
  36. :> account of aliasing of devices through multiple inodes with the same
  37. :> major/minor device number could take account of aliasing through the
  38. :> console.
  39. :> 
  40. :> Have I understood this correctly?
  41.  
  42. I think so.
  43. I don't know if vcount() could solve the problem, but there is another
  44. solution to this problem, which could also solve the problem of the
  45. hanging console after a X-Server crash:
  46. Why not create an additional minor device to the pccons device, which
  47. switches to graphics mode when opened, and back when closed. Then there
  48. would be no need to ever use the console through devices other than
  49. /dev/console (except for the X server, of course !).
  50. I would try it myself, but I don't have room and time for a XFree compile 8-(.
  51.  
  52. :> -- Richard
  53.                             
  54.                             Christoph
  55.