delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/09/08/16:31:55

From: Steve Charters <charters AT ferndown DOT tt DOT slb DOT com>
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: <Pine.SUN.3.96.980908161656.1037A-100000@alpha>
References: <Pine DOT SUN DOT 3 DOT 96 DOT 980908091624 DOT 795A-100000 AT alpha>
NNTP-Posting-Host: alpha.ferndown.ate.slb.com
Mime-Version: 1.0
In-Reply-To: <Pine.SUN.3.96.980908091624.795A-100000@alpha>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019