From: Steve Charters Newsgroups: comp.os.msdos.djgpp Subject: Re: Blocking Read Problem with DJGPP Date: Tue, 8 Sep 1998 16:18:56 +0100 Organization: Schlumberger SINet, London, England Lines: 37 Message-ID: References: NNTP-Posting-Host: alpha.ferndown.ate.slb.com Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII In-Reply-To: To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk On Tue, 8 Sep 1998, Steve Charters wrote: > Hi, > > Can anyone help me with this. > > I have a program which reads and write to the serial port. The reads and > writes should be non-blocking, so I use > > fd = open(name, O_RDWR | O_NONBLOCK); > > Under UNIX on a Sun Sparc compiled with gcc this works fine but when I > ported to PC with DJGPP and using COM2 I find that the reads block, and my > utility hangs. > > Anyone got any ideas why this is and a possible work around. > > Thanks, > > Steve I've got an extra problem as well. The PC only seems to ba able to read from the serial port if a Carridge Return is sent. Is this normal?, can I get round it?. Is it a feature of DOS, the compiler, or just me not doing it right? Any help would be great Steve ------------------------------------------------------------------------------- Steve Charters Ferndown Industrial Estate Ferndown Product Development Centre Wimborne Schlumberger ATE Dorset charters AT ferndown DOT tt DOT slb DOT com BH21 7PP Tel. +44 (0)1202 850833 England