home *** CD-ROM | disk | FTP | other *** search
- 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
- From: daves@hpcvusd.cv.hp.com (Dave Serisky)
- Newsgroups: comp.sys.hp
- Subject: Re: TIOCCONS ioctl call?
- Message-ID: <1992Dec11.220812.5513@hpcvusn.cv.hp.com>
- Date: 11 Dec 92 22:08:12 GMT
- References: <1992Dec10.221640.24187@netcom.com>
- Sender: nobody@hpcvusn.cv.hp.com (Nobody - UID must be 99999)
- Organization: Hewlett-Packard Co., Corvallis, OR, USA
- Lines: 48
- Nntp-Posting-Host: hpcvusd.cv.hp.com
-
- In article <1992Dec10.221640.24187@netcom.com>, ocsinc@netcom.com (Operations Control Systems) writes:
- |> I wrote a program which opens a master/slave pty pair, and uses TIOCCONS
- |> to set the slave to the console. Reading from the master works, as
- |> anything sent to the console is intercepted. Anything written to the master
- |> is lost. I assume it is supposed to go to the shell process running
- |> on the console. ...
-
- The ioctl was redefined at some release to only redirect console output.
- Console input is not redirected. The objective of the ioctl was to
- allow the presentation of data (console messages) that would normally
- get written to the ITE associated with the X server and (depending on
- the OS and hardware) either not show up at all until the X server was
- terminated, or would step on top of the X server's bitmap (in which case
- generally neither the X server nor the console data was readable).
- Another objective was not to allow the ioctl to be used to take over the
- console device (hence the readonly nature of it and the fact that you
- need to be running suid root to use it).
-
- |> ... I have two questions:
- |> 1. How to send to the "real" console without closing the pty
- |> and interrupting the capture?
-
- What I've always done on the series 400 was to create a /dev/ite that
- was aimed at the ite device (major dev the one used for serial devices,
- minor dev 0 (on the s400)). I then ran my getty against it. In this
- instance, I could access the ite (bitmap) via /dev/ite and since it was
- the default system console, output to /dev/console would be fired to it.
- When another serial device executed a TIOCCONS ioctl, output to
- /dev/console would be sent to that device and output directed to
- /dev/ite (i.e., something run from the getty) would continue to go to
- the ite. I'm not sure what the behaviour is on the 700, but I suspect
- that the functionality is there as well.
-
- |> 2. How to send to the shell process on the console?
- |> I am running on a HP9000/817 under HP/UX 8.0
-
- You go to the console device and type the characters at the keyboard.
- This does assume that your X server has not taken over the console's
- keyboard.
-
- |> thanx,
- |> ----
- |> Robert Diamond, OCS (415) 493-4122
- |> 560 San Antonio Rd #106 netcom!sputnik!rob
-
- --
- -- Dave Serisky
- email - daves@cv.hp.com
-