home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / unix / bsd / 10186 < prev    next >
Encoding:
Text File  |  1992-12-14  |  2.8 KB  |  70 lines

  1. Newsgroups: comp.unix.bsd
  2. Path: sparky!uunet!haven.umd.edu!darwin.sura.net!wupost!newsfeed.rice.edu!rice!news.Rice.edu!rich
  3. From: rich@Rice.edu (& Murphey)
  4. Subject: Re: More on pccons/XFree86 problems (keyboard hangs)
  5. In-Reply-To: chmr@fstgds01.tu-graz.ac.at's message of Mon, 14 Dec 92 11:54:44 GMT
  6. Message-ID: <RICH.92Dec14095633@superego.Rice.edu>
  7. Sender: news@rice.edu (News)
  8. Reply-To: Rich@rice.edu
  9. Organization: Department of Electrical and Computer Engineering, Rice
  10.     University
  11. References: <1992Dec13.172900.451@ponds.uucp> <1992Dec14.115444.12691@news.tu-graz.ac.at>
  12. Date: Mon, 14 Dec 1992 15:56:33 GMT
  13. Lines: 55
  14.  
  15. >>>>> In article <1992Dec14.115444.12691@news.tu-graz.ac.at>, chmr@fstgds01.tu-graz.ac.at (Christoph Robitschko) writes:
  16. Christoph> In article <1992Dec13.172900.451@ponds.uucp> rivers@ponds.uucp (Thomas David Rivers) writes:
  17. >  Try it out yourself, inside of an X window, do a :
  18. >
  19. >     kill -1 `cat /var/run/syslog.pid`
  20. >
  21. >  and your keyboard will lock up.
  22. >
  23. >
  24. >I will probably try and examine the stock pccons.c to determine where
  25. >the problem can be corrected... but if someone has an idea/fix, feel
  26. >free to beat me to it...
  27. >
  28. Christoph> The problem is that the pccons driver is used in two ways: first in 
  29. Christoph> the standard way through pcopen() etc., and second as a console device
  30. Christoph> through cnopen(). 
  31. Christoph> The cn???() calls simply call the corresponding pc???() routines, which 
  32. Christoph> is OK for open(), read() and write(), but not for close(), because
  33. Christoph> the close routine is only to be called when the LAST reference to 
  34. Christoph> the device was closed. But when the last reference to the console device
  35. Christoph> is closed (as happens when you kill or SIGHUP the syslogd), cnclose()
  36. Christoph> calls pcclose(), no matter if there are any references to the pccons
  37. Christoph> device (such as the keyboard input for your shell or X server).
  38. Christoph> pcclose() then thinks there is no more reference to it and disables
  39. Christoph> keyboard input.
  40.  
  41. Christoph> One possible solution would be to modify pcclose() to only do the real
  42. Christoph> close operation if there are really no more files open on it (A sort of
  43. Christoph> reference count or reference bits for each device type is needed).
  44.  
  45. Another solution might be to ignore the close while the X server is
  46. running:
  47.  
  48. diff -cb pccons.c~ pccons.c
  49. *** pccons.c~    Mon Dec 14 09:07:08 1992
  50. --- pccons.c    Mon Dec 14 09:07:52 1992
  51. ***************
  52. *** 241,246 ****
  53. --- 241,250 ----
  54.       int flag, mode;
  55.       struct proc *p;
  56.   {
  57. + #ifdef XSERVER
  58. +     if (pc_xmode)
  59. +         return (0);
  60. + #endif /* XSERVER */
  61.       (*linesw[pccons.t_line].l_close)(&pccons, flag);
  62.       ttyclose(&pccons);
  63.       return(0);
  64.  
  65.  
  66. Christoph> I don't know if any of the replacement pccons (or codrv) drivers fix this.
  67.  
  68. codrv does fix this and should be supported in the next XFree86
  69. release.  Rich
  70.