Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Data being reflected back from pty master

0 views
Skip to first unread message

Boltar

unread,
Oct 5, 2008, 5:35:01 AM10/5/08
to
Hi

I've written some code which opens a pty master using the
posix_openpt(), grantpt() and unlockpt() group of functions and then a
child is forked which opens a slave to this master pty. It all seems
to work fine but the problem is that any data I write() to the master
file descriptor in the parent process seems to be reflected back as
well as being sent to the child descriptor and when I do a read() on
the master fd I get the data I just wrote along with any data from the
slave pty. Has anyone come across this sort of behaviour before on
linux?

Thanks for any help

B2003

Barry Margolin

unread,
Oct 5, 2008, 7:47:54 AM10/5/08
to
In article
<6908171d-8e04-4a76...@i76g2000hsf.googlegroups.com>,
Boltar <bolta...@yahoo.co.uk> wrote:

Run "stty -echo" in the child to turn off echoing.

--
Barry Margolin, bar...@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***

0 new messages