delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/02/20/02:17:11

Date: Thu, 20 Feb 2003 09:16:55 +0200
From: Zaretskii Eli <ezaretski AT elta DOT co DOT il>
Subject: RE: COM1: always non-blocking?
To: Keith Doyle <kdd21 AT hotmail DOT com>, djgpp AT delorie DOT com
Message-id: <4D19136444628A40840EFE8C5AE04147017A47@ELTIMAIL1.elta.co.il>
MIME-version: 1.0
X-MIMEOLE: Produced By Microsoft Exchange V6.0.6249.0
Thread-topic: COM1: always non-blocking?
Thread-index: AcLYPua/meNn5WStRxK2bb+LyhifRgAcPD7w
X-PRIVAWALL-ID: 0002556710ab
X-OriginalArrivalTime: 20 Feb 2003 07:16:55.0606 (UTC)
FILETIME=[0C8AC560:01C2D8B0]
Note-from-DJ: This may be spam
Reply-To: djgpp AT delorie DOT com

This message was scanned for viruses and other malicious code by PrivaWall.


This mail was sent from ELTA SYS LTD.


> From: Keith Doyle [mailto:kdd21 AT hotmail DOT com] 
> Sent: Wednesday, February 19, 2003 7:39 PM
> 
> A call to read() returns immediately whether or not there is a
> character, if there is none it returns 0, so I can just loop until
> read() > 0 and I can get the chars.

You could also use `select' for this.

> It would appear to be a polling
> loop that way however, and according to a previous poster, could
> "miss" characters if not called quickly enough

Yes, that's true.  However, with modern CPUs, perhaps such polling is
not a big problem.


This message is processed by the PrivaWall Email Security Server. 

- Raw text -


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