home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / unix / bsd / 11953 < prev    next >
Encoding:
Text File  |  1993-01-28  |  5.4 KB  |  171 lines

  1. Newsgroups: comp.unix.bsd
  2. Path: sparky!uunet!think.com!yale.edu!newsserver.jvnc.net!gmd.de!borneo.gmd.de!veit
  3. From: veit@borneo.gmd.de (Holger Veit)
  4. Subject: Re: [386bsd] X broken with new patchkit ?
  5. Message-ID: <1993Jan28.091650.29630@gmd.de>
  6. Sender: news@gmd.de (USENET News)
  7. Nntp-Posting-Host: fanoe
  8. Organization: GMD
  9. References:  <4374@wzv.win.tue.nl>
  10. Date: Thu, 28 Jan 1993 09:16:50 GMT
  11. Lines: 158
  12.  
  13. In article <4374@wzv.win.tue.nl>, guido@gvr.win.tue.nl (Guido van Rooij) writes:
  14. |> I installed the new patchkit a few days ago. I also had keycap-0.1.1 (codrv)
  15. |> installed. This used to work fine, but now that I've installed the new
  16. |> patchkit, the keyboard isn't functioning quite well anymore when using X.
  17. |> Symptoms are that after pressing a key you have to wiat several seconds
  18. |> for the key to become visible on your xterm UNLESS you move your mouse..
  19. |> then the char immediately shows up. Anyone having the same behaviour?
  20. |> 
  21. |> 
  22. |> -Guido
  23.  
  24. I already replied to you by email, but this seems to be a more general issue.
  25. The patchkit has (at least one) builtin incompatibility regarding the behaviour
  26. of select(2). In the patchkit there is a change in the kernel that lets select
  27. wait on a process's pid rather than a pointer to its struct proc. This is
  28. actually a patch which should be 386bsd-0.2 stuff, and shouldn't have gone
  29. into the patchkit. Anyway, since codrv aka keycap has a select stub, there are
  30. necessary changes (see below). Andrew Chernov (ache@astral.msk.su) was so kind
  31. to prepare a fix for this, before I did, and sent it to me; the following patch
  32. should fix the problem (ONLY IF YOU HAVE PATCHKIT-2 INSTALLED!!!) The below patch
  33. is the only fix added to the last BUGLIST.151292 at /usr/src/sys.extras/veit-console
  34. at ref.tfs.com, the actual version is BUGLIST.270193.
  35.  
  36. Holger
  37.  
  38. ----CUT HERE---
  39. BUG 15: There are problems with the new patchkit-0.2.
  40.  
  41. FIX 15:    The latest patchkit-0.2 introduces an incompatibility regarding
  42.     the interpretation of the wait argument for selections.
  43.     It does no longer use struct *proc, but the pid_t instead.
  44.     The following patch kindly prepared by Andrew A. Chernow
  45.     (ache@astral.msk.su) will fix this. This will be default in
  46.     the next version of codrv.
  47.     DON'T APPLY THIS PATCH IF YOU DON'T HAVE THE NEW PATCHKIT!!!
  48.  
  49. *** co_hdr.h.sel    Sun Nov 22 18:35:19 1992
  50. --- co_hdr.h    Wed Jan 27 16:21:51 1993
  51. ***************
  52. *** 122,128 ****
  53.       int    cs_timo;    /* timeouts since interrupt (unused) */
  54.       u_long    cs_wedgecnt;    /* times restarted (unused)*/
  55.       u_long    cs_ovfl;    /* buffer overflows */
  56. !     struct proc *cs_selp;    /* Process waiting for select call */
  57.       int    cs_pgid;    /* Process group for ASYNC I/O */
  58.   /*XXX*/    struct tty *cs_constty;    /* used to restore constty if */
  59.                   /* anyone dares to steal CONSOLE during raw open */
  60. --- 122,128 ----
  61.       int    cs_timo;    /* timeouts since interrupt (unused) */
  62.       u_long    cs_wedgecnt;    /* times restarted (unused)*/
  63.       u_long    cs_ovfl;    /* buffer overflows */
  64. !     pid_t   cs_rsel;        /* Process waiting for select call */
  65.       int    cs_pgid;    /* Process group for ASYNC I/O */
  66.   /*XXX*/    struct tty *cs_constty;    /* used to restore constty if */
  67.                   /* anyone dares to steal CONSOLE during raw open */
  68. *** co_kbd.c.sel    Wed Jan 27 15:23:03 1993
  69. --- co_kbd.c    Wed Jan 27 16:31:57 1993
  70. ***************
  71. *** 138,144 ****
  72.       initrb(&co_buf);
  73.   
  74.       /* signal opening process only */
  75. !     consoftc.cs_selp = 0;
  76.       consoftc.cs_pgid = p->p_pid;
  77.   
  78.       return 0;
  79. --- 138,144 ----
  80.       initrb(&co_buf);
  81.   
  82.       /* signal opening process only */
  83. !     consoftc.cs_rsel = 0;
  84.       consoftc.cs_pgid = p->p_pid;
  85.   
  86.       return 0;
  87. ***************
  88. *** 156,162 ****
  89.       if (minor(dev)==0x80) return 0;
  90.   
  91.       consoftc.cs_flags &= ~(CO_OPENRAW|CO_ASYNC);
  92. !     consoftc.cs_selp = 0;
  93.       consoftc.cs_pgid = 0;
  94.   
  95.       /* do we need to restore console?
  96. --- 156,162 ----
  97.       if (minor(dev)==0x80) return 0;
  98.   
  99.       consoftc.cs_flags &= ~(CO_OPENRAW|CO_ASYNC);
  100. !     consoftc.cs_rsel = 0;
  101.       consoftc.cs_pgid = 0;
  102.   
  103.       /* do we need to restore console?
  104. ***************
  105. *** 277,285 ****
  106.   
  107.       if (!(consoftc.cs_flags & CO_OPENRAW))
  108.           return;
  109. !     if (consoftc.cs_selp) {
  110. !         selwakeup(consoftc.cs_selp,0);
  111. !         consoftc.cs_selp = 0;
  112.       }
  113.       if (consoftc.cs_flags & CO_ASYNC) {
  114.           if (consoftc.cs_pgid < 0)
  115. --- 277,285 ----
  116.   
  117.       if (!(consoftc.cs_flags & CO_OPENRAW))
  118.           return;
  119. !     if (consoftc.cs_rsel) {
  120. !         selwakeup(consoftc.cs_rsel,0);
  121. !         consoftc.cs_rsel = 0;
  122.       }
  123.       if (consoftc.cs_flags & CO_ASYNC) {
  124.           if (consoftc.cs_pgid < 0)
  125. ***************
  126. *** 306,312 ****
  127.               splx(s);
  128.               return 1;
  129.           }
  130. !         consoftc.cs_selp = p;
  131.       }
  132.       splx(s);
  133.       return 0;
  134. --- 306,312 ----
  135.               splx(s);
  136.               return 1;
  137.           }
  138. !         consoftc.cs_rsel = p->p_pid;
  139.       }
  140.       splx(s);
  141.       return 0;
  142. ***************
  143. *** 1182,1188 ****
  144.                   consoftc.cs_flags |= CO_OPENRAW;
  145.               ofl = 0;
  146.           }
  147. !         consoftc.cs_selp = 0;
  148.           break;
  149.       case KBDRESET8042:
  150.           doreset();
  151. --- 1182,1188 ----
  152.                   consoftc.cs_flags |= CO_OPENRAW;
  153.               ofl = 0;
  154.           }
  155. !         consoftc.cs_rsel = 0;
  156.           break;
  157.       case KBDRESET8042:
  158.           doreset();
  159.  
  160. ---CUT HERE---
  161.  
  162.  
  163.  
  164. -- 
  165.          Dr. Holger Veit                   | INTERNET: veit@fanoe.gmd.de
  166. |  |   / GMD-SET German National Research  | Phone: (+49) 2241 14 2448
  167. |__|  /  Center for Computer Science       | Fax:   (+49) 2241 14 2342
  168. |  | /   P.O. Box 13 16                    |    Three lines Signature space
  169. |  |/    Schloss Birlinghoven              |    available for rent. Nearly
  170.          DW-5205 St. Augustin, Germany     |    unused, good conditions
  171.