home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / fj / os / 386bsd / 347 < prev    next >
Encoding:
Text File  |  1993-01-27  |  4.1 KB  |  118 lines

  1. Newsgroups: fj.os.386bsd
  2. Path: sparky!uunet!ccut!news.u-tokyo.ac.jp!s.u-tokyo!kuis!kmc-box2!nntp!ukai
  3. From: ukai@kmc.kyoto-u.ac.jp (Ukai Fumitoshi)
  4. Subject: Re: [386bsd(98)] Q. ps command and Nemacs shell-mode
  5. In-Reply-To: tatsuo@myo.inst.keio.ac.jp's message of Tue, 26 Jan 1993 03:33:30 GMT
  6. Message-ID: <UKAI.93Jan27232238@pokota.kmc.kyoto-u.ac.jp>
  7. Sender: news@box2.kmc.kyoto-u.ac.jp (News system Manager #2)
  8. Nntp-Posting-Host: pokota
  9. Reply-To: ukai@kuamp.kyoto-u.ac.jp
  10. Organization: Kyoto University Microcomputer Club, Kyoto, Japan
  11. References: <SAITO.93Jan20191157@koto.seg.kobe-u.ac.jp>
  12.     <TATSUO.93Jan26123327@epsilon.myo.inst.keio.ac.jp>
  13. Distribution: fj
  14. Date: Wed, 27 Jan 1993 14:22:38 GMT
  15. Lines: 101
  16.  
  17.  
  18. $@$&$+$$!w5~Bg%^%$%3%s%/%i%V$G$9!#(J
  19.  
  20. In article <TATSUO.93Jan26123327@epsilon.myo.inst.keio.ac.jp> 
  21.     tatsuo@myo.inst.keio.ac.jp (Tatsuo SATOH) writes:
  22.  
  23. >>>>>> On 21 Jan 93 00:11:57 GMT, 
  24.     saito@seg.kobe-u.ac.jp (Saito Yoshinori) said:
  25. >      $@@FF#$5$s(J> $@$=$N#1!'(J
  26. >      $@@FF#$5$s(J>   ps $@%3%^%s%I$G!$(JTTY $@$NMs$,%3%s%=!<%k$,(J ?? $@$H$J$j!$(Jcom0 $@$,(J co $@$H$J$k$N(J
  27. >      $@@FF#$5$s(J> $@$G$9$,!$$3$l$O(J$@2?=h$,0-$$$N$G$7$g$&$+!%(J
  28.  
  29.  $@$3$l$O$H$j$"$($:<!$N(J patch $@$GD>$k$h$&$G$9!#(J
  30. # comp.unix.bsd $@$+$i$NE>:\$G$9(J$@!#(J
  31.  
  32. ----------------------------------------------------------------
  33. From: duplain@rtf.bt.co.uk (Andy Duplain)
  34. Newsgroups: comp.unix.bsd
  35. Subject: Patch to allow ps(1) to identify console-controlled processes
  36. Message-ID: <1992Dec21.154652.28356@rtf.bt.co.uk>
  37. Date: 21 Dec 92 15:46:52 GMT
  38. Organization: BT Customer Systems, Brighton, UK
  39. Lines: 61
  40.  
  41.  
  42.     Hi, here is a hack to allow ps(1) to see processes that have the
  43.     console as there controlling tty.  I don't understand why there
  44.     is both a console and a PC console device, but basically all
  45.     processes that are controlled from the console have the major device
  46.     number of 12, while /dev/console has a major device number of 0.  An
  47.     alternative solution _could_ be to add a filesystem node for the
  48.     PC console device and then run dev_mkdb(8) again (having changed the
  49.     definition of _PATH_CONSOLE from /dev/console to /dev/whatever).
  50.  
  51.     I don't have X running so these things may have been patched properly
  52.     by someone else...
  53.  
  54.     Apply these patches at your own risk --  THEY CERTAINLY ARE A HACK!
  55.  
  56. *** ps.c.ORIG    Mon Dec 21 15:23:58 1992
  57. --- ps.c    Mon Dec 21 15:33:45 1992
  58. ***************
  59. *** 195,203 ****
  60.               struct stat stbuf;
  61.               char pathbuf[MAXPATHLEN];
  62.   
  63. !             if (strcmp(optarg, "co") == 0)
  64. !                 ttypath = _PATH_CONSOLE;
  65. !             else if (*optarg != '/')
  66.                   (void) sprintf(ttypath = pathbuf, "%s%s",
  67.                       _PATH_TTY, optarg);
  68.               else
  69. --- 195,204 ----
  70.               struct stat stbuf;
  71.               char pathbuf[MAXPATHLEN];
  72.   
  73. !             if (strcmp(optarg, "co") == 0) {
  74. !                 ttydev = 0x0c00;    /* HACK!!! */
  75. !                 break;
  76. !             } else if (*optarg != '/')
  77.                   (void) sprintf(ttypath = pathbuf, "%s%s",
  78.                       _PATH_TTY, optarg);
  79.               else
  80. *** devname.c.ORIG    Mon Dec 21 15:09:00 1992
  81. --- devname.c    Mon Dec 21 15:27:04 1992
  82. ***************
  83. *** 54,59 ****
  84. --- 54,65 ----
  85.       static int failure;
  86.       DBT data, key;
  87.   
  88. +     /* hack to allow processes with the PC console device as there
  89. +        controlling tty to be seen -- duplain@btcs.bt.co.uk */
  90. +     if (major(dev) == 12)
  91. +         return ("co");
  92.       if (!db && !failure &&
  93.           !(db = hash_open(_PATH_DEVDB, O_RDONLY, 0, NULL))) {
  94.           (void)fprintf(stderr,
  95.  
  96.  
  97. -- 
  98. Andy Duplain, BT Customer Systems, Brighton, UK.           duplain@rtf.bt.co.uk
  99. #define    DISCLAIMER      My views and opinions are my own, and not my company's
  100. ----------------------------------------------------------------
  101.  
  102. >      $@@FF#$5$s(J> $@$=$N#2!'(J
  103. >      $@@FF#$5$s(J>   Nemacs $@$G(J shell $@%b!<%I$K$9$k$H!$(Jshell $@%P%C%U%!$K(J
  104. >
  105. >      $@@FF#$5$s(J>     Warning: no access to tty (Inappropriate ioctl for device).
  106. >      $@@FF#$5$s(J>     Thus no job control in this shell.
  107. >
  108. >$@;d$N$H$3$m$bF1$8>I>u$G$9!#(J
  109.  
  110.  $@$3$A$i$NJ}(J$@$ONI$/J,$+$j$^$;$s!#(J
  111.  
  112. ---
  113. $@1-;tJ8IR(J
  114. $@5~ETBg3XBg3X1!9)3X8&5f2J1~MQ%7%9%F%`2J3X@l96D9C+@n8&(J ukai@kuamp.kyoto-u.ac.jp
  115. $@5~Bg%^%$%3%s%/%i%V(J                                     ukai@kmc.kyoto-u.ac.jp
  116.