Packet mode in pseudo terminal

po at volta.ece.utexas.edu po at volta.ece.utexas.edu
Wed Feb 8 19:02:24 AEST 1989


I am writing a program which makes use of a pseudo terminal
to communicate with a child process.

Everything works fine on a VAXstation II/GPX running Ultrix 2.3.
However, on Sun-3 and Sun-4, I cannot disable the packet mode 
of the pseudo terminal using the following code:
	int n = 0;
	...
	ioctl(master, TIOCPKT, &n);
where master is the file descriptor of the master side.
So whatever is written to the slave side still reappears on the 
master side on subsequent reads.

The above problem disappears after rebooting the Sun-3 running 
SunOS 3.4.
But rebooting the Sun-4 running SunOS 4.0 doesn't do the trick.

So, is there a more 'civilized' way of resetting the pseudo
terminal characteristics so as to disable the packet mode?

I have read through the pty man page but couldn't find a clue.
Would someone please help me out on this?

Thanks much,
  Po		(po at volta.ece.utexas.edu)



More information about the Comp.unix.questions mailing list