home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / hp / 13998 < prev    next >
Encoding:
Internet Message Format  |  1992-12-11  |  2.8 KB

  1. Path: sparky!uunet!cs.utexas.edu!sun-barr!olivea!charnel!rat!usc!sdd.hp.com!hp-cv!hp-pcd!hpcvusn!hpcvusd.cv.hp.com!daves
  2. From: daves@hpcvusd.cv.hp.com (Dave Serisky)
  3. Newsgroups: comp.sys.hp
  4. Subject: Re: TIOCCONS ioctl call?
  5. Message-ID: <1992Dec11.220812.5513@hpcvusn.cv.hp.com>
  6. Date: 11 Dec 92 22:08:12 GMT
  7. References: <1992Dec10.221640.24187@netcom.com>
  8. Sender: nobody@hpcvusn.cv.hp.com (Nobody - UID must be 99999)
  9. Organization: Hewlett-Packard Co., Corvallis, OR, USA
  10. Lines: 48
  11. Nntp-Posting-Host: hpcvusd.cv.hp.com
  12.  
  13. In article <1992Dec10.221640.24187@netcom.com>, ocsinc@netcom.com (Operations Control Systems) writes:
  14. |> I wrote a program which opens a master/slave pty pair, and uses TIOCCONS
  15. |> to set the slave to the console.  Reading from the master works, as
  16. |> anything sent to the console is intercepted.  Anything written to the master
  17. |> is lost.  I assume it is supposed to go to the shell process running
  18. |> on the console.  ...
  19.  
  20. The ioctl was redefined at some release to only redirect console output.
  21. Console input is not redirected.  The objective of the ioctl was to
  22. allow the presentation of data (console messages) that would normally
  23. get written to the ITE associated with the X server and (depending on
  24. the OS and hardware) either not show up at all until the X server was
  25. terminated, or would step on top of the X server's bitmap (in which case
  26. generally neither the X server nor the console data was readable).
  27. Another objective was not to allow the ioctl to be used to take over the
  28. console device (hence the readonly nature of it and the fact that you
  29. need to be running suid root to use it).
  30.  
  31. |>             ...  I have two questions:
  32. |>     1.  How to send to the "real" console without closing the pty
  33. |>     and interrupting the capture?
  34.  
  35. What I've always done on the series 400 was to create a /dev/ite that
  36. was aimed at the ite device (major dev the one used for serial devices,
  37. minor dev 0 (on the s400)).  I then ran my getty against it.  In this
  38. instance, I could access the ite (bitmap) via /dev/ite and since it was
  39. the default system console, output to /dev/console would be fired to it.
  40. When another serial device executed a TIOCCONS ioctl, output to
  41. /dev/console would be sent to that device and output directed to
  42. /dev/ite (i.e., something run from the getty) would continue to go to
  43. the ite.  I'm not sure what the behaviour is on the 700, but I suspect
  44. that the functionality is there as well.
  45.  
  46. |>     2.  How to send to the shell process on the console?
  47. |> I am running on a HP9000/817 under HP/UX 8.0
  48.  
  49. You go to the console device and type the characters at the keyboard.
  50. This does assume that your X server has not taken over the console's
  51. keyboard.
  52.  
  53. |>         thanx,
  54. |> ----
  55. |> Robert Diamond, OCS        (415) 493-4122
  56. |> 560 San Antonio Rd #106        netcom!sputnik!rob
  57.  
  58. -- 
  59. -- Dave Serisky
  60.    email - daves@cv.hp.com
  61.