home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.linux
- Path: sparky!uunet!munnari.oz.au!metro!extro.ucc.su.OZ.AU!arumble
- From: arumble@extro.ucc.su.OZ.AU (Anthony Rumble)
- Subject: PTYP/TTYP programming..
- Message-ID: <arumble.713786641@extro.ucc.su.OZ.AU>
- Sender: news@ucc.su.OZ.AU
- Nntp-Posting-Host: extro.ucc.su.oz.au
- Organization: Sydney University Computing Service, Sydney, NSW, Australia
- Date: Fri, 14 Aug 1992 10:04:01 GMT
- Lines: 38
-
- Im sure this is a common problem, but.. i have no information
- to help me with this..
-
- I am writing a small client to do something, that uses PTYP/TTYP pairs..
-
- The client opens the ttyp open("/dev/ttyp0", O_RDWR) etc etc
-
- and then fdopen's two streams (one for input, one for output)..
-
- well.. anything that is sent to /dev/ptyp0 for some reason
- ends up on the client twice!!?!?!
-
- the client only does this as yet..
-
- while(1)
- {
- ch = fgetc(datin)l
- printf("%c", ch);
- }
-
- If in another VT.. I do this echo hello >/dev/ptyp0
-
- I will get
-
- Hello
- Hello
-
- I get it twice?!?!
-
- Any ideas..
-
- Thanx in advance
-
-
- --
- Anthony Rumble
- aka SmilieZ
- "Anything is possible.. If there is enuf money in it"
-