delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/02/19/01:28:12

Date: Wed, 19 Feb 2003 08:26:44 +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: <4D19136444628A40840EFE8C5AE04147017A30@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: AcLXkOPf9Z5WcjdGQlOxfLnDLlkr9wATkc8g
X-PRIVAWALL-ID: 0002556710ab
X-OriginalArrivalTime: 19 Feb 2003 06:27:26.0748 (UTC)
FILETIME=[F88D3DC0:01C2D7DF]
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: Tuesday, February 18, 2003 10:01 PM
> 
> So, I gave up on dzcomm, bcserio,pmcom, etc..  I then thought for a
> moment, that under a DOS window you can do something as simple as
> "echo 'hello' >COM1" so why not just trying to do an open on COM1:.

You don't need to do that, actually: file descriptor 3 is already
preconnected to the COM1 port, and the stdaux FILE object is open on
that descriptor.  Just use them.

> Well, it worked pretty good.  The only gotcha seems to be that read
> appears to always be NONBLOCKING

Please explain what you mean by this.  DJGPP generally doesn't support
non-blocking I/O (since it requires a multiprocessing OS).

> I tried using fcntl, ioctl, and tcgetattr, but none of these seemed to
> do anything useful (though for fcntl and tcgetattr, I just tried to
> GET the current info, rather than set anything, but because it always
> seemed to return 0 for everything, I figured this stuff isn't
> connected...).

Fcntl, ioctl, and termios don't really support COMx ports in the DJGPP
implementation, since DOS system calls don't. Sorry.


This message is processed by the PrivaWall Email Security Server. 

- Raw text -


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