Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!wuarchive!rex!ukma!usenet.ins.cwru.edu!gatech!bloom-beacon!eru!hagbard!sunic!mcsun!ukc!axion!uzi-9mm.fulcrum.bt.co.uk!cat.fulcrum.bt.co.uk!cnix!klaus From: klaus@cnix.uucp (klaus u schallhorn) Newsgroups: comp.unix.programmer Subject: Re: Read and write /dev/ttya? Message-ID: <1991Jan24.110833.9824@cnix.uucp> Date: 24 Jan 91 11:08:33 GMT References: <3971@stl.stc.co.uk> Organization: pionier publications Lines: 15 In article <3971@stl.stc.co.uk> "Andrew G. Minter" writes: >In the referenced article veit@du9ds3.uni-duisburg.de (Holger Veit) writes: >>montnaro@spyder.crd.ge.com (Skip Montanaro) writes: >>>The getc() just hangs. What am I doing wrong? >>stdio does input and output buffering. If your answering device does not >>deliver a Carriage return as a block limiter, your getc() call will wait >>forever. Try including >> setbuf(f,NULL); > Unless you set ICANON off it's going to wait until it receives a linefeed. Have a look in termio(4). klaus -- George Orwell was an Optimist