home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / unix / bsd / 10178 < prev    next >
Encoding:
Text File  |  1992-12-14  |  2.0 KB  |  49 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.tu-graz.ac.at (Christoph Robitschko)
  4. Subject: Re: More on pccons/XFree86 problems (keyboard hangs)
  5. Message-ID: <1992Dec14.115444.12691@news.tu-graz.ac.at>
  6. Keywords: 386BSD X11 XFree86 console pccons
  7. Sender: news@news.tu-graz.ac.at (USENET News System)
  8. Nntp-Posting-Host: fstgds01
  9. Organization: Technical University of Graz, Austria
  10. References: <1992Dec13.172900.451@ponds.uucp>
  11. Date: Mon, 14 Dec 92 11:54:44 GMT
  12. Lines: 35
  13.  
  14. In article <1992Dec13.172900.451@ponds.uucp> rivers@ponds.uucp (Thomas David Rivers) writes:
  15. >  Try it out yourself, inside of an X window, do a :
  16. >
  17. >     kill -1 `cat /var/run/syslog.pid`
  18. >
  19. >  and your keyboard will lock up.
  20. >
  21. >
  22. >I will probably try and examine the stock pccons.c to determine where
  23. >the problem can be corrected... but if someone has an idea/fix, feel
  24. >free to beat me to it...
  25. >
  26. The problem is that the pccons driver is used in two ways: first in 
  27. the standard way through pcopen() etc., and second as a console device
  28. through cnopen(). 
  29. The cn???() calls simply call the corresponding pc???() routines, which 
  30. is OK for open(), read() and write(), but not for close(), because
  31. the close routine is only to be called when the LAST reference to 
  32. the device was closed. But when the last reference to the console device
  33. is closed (as happens when you kill or SIGHUP the syslogd), cnclose()
  34. calls pcclose(), no matter if there are any references to the pccons
  35. device (such as the keyboard input for your shell or X server).
  36. pcclose() then thinks there is no more reference to it and disables
  37. keyboard input.
  38.  
  39. One possible solution would be to modify pcclose() to only do the real
  40. close operation if there are really no more files open on it (A sort of
  41. reference count or reference bits for each device type is needed).
  42.  
  43. I don't know if any of the replacement pccons (or codrv) drivers fix this.
  44.  
  45.  
  46.                             Christoph
  47. -- 
  48. .signature: Connection timed out
  49.