🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.programmer
Article #451

Re: Timeouts when reading from a serial port

#451
From: moose
Date: Tue, 04 Aug 1992 16:30
19 lines
1221 bytes
In article <71tmbc#.abell@netcom.com> abell@netcom.com (Steven T. Abell)  
writes:
> The read function blocks until it has read enough stuff from the port.
> But if there is nothing out there to respond, the application hangs.
> Very annoying. I've dealt with this kind of thing a zillion times on
> embedded realtime systems, but I don't know how to approach it in this
> programming environment. Is there a preferred way of solving this problem?
> 

There is an ioctl called FIONBIO which will handle this problem for you.  The  
only documentation is in the header file /usr/include/sys/ioctl.h, but this one  
is pretty straight forward.

 
--
Michael Rutman			|	moose@svcdudes.com
Cubist				|	makes me a NeXT programmer
Software Ventures		|	maker of MicroPhone II
#include <std.disclaimer>
Technical Details
Message-ID: <1992Aug4.163049.16431@svcdudes.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!psinntp!svc!news
References: <71tmbc#.abell@netcom.com>

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!psinntp!svc!news
From: moose@svcdudes.com
Subject: Re: Timeouts when reading from a serial port
Message-ID: <1992Aug4.163049.16431@svcdudes.com>
Sender: news@svcdudes.com
Reply-To: moose@svcdudes.com
Organization: Software Ventures, Inc.
References: <71tmbc#.abell@netcom.com>
Distribution: na
Date: Tue, 4 Aug 92 16:30:49 GMT
Lines: 19