gforth
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gforth] problem with gforth7 and serial access


From: David Kuehling
Subject: Re: [gforth] problem with gforth7 and serial access
Date: Thu, 22 Mar 2012 16:44:53 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)

>>>>> "Bernd" == Bernd Paysan <address@hidden> writes:

> I don't know why the select code should not work on serial lines, this
> must be a bug in Linux.

Sure, that this is not a bug in Gforth code?  Select() is pretty
difficult to get right.  E.g. you must read all input data until read()
returns EAGAIN, before calling select().  Failing to do so will make
select() block forever, as select is "edge triggered", and only returns
if the state of "data available" has a transition.

cheers,

David
-- 
GnuPG public key: http://dvdkhlng.users.sourceforge.net/dk.gpg
Fingerprint: B17A DC95 D293 657B 4205  D016 7DEF 5323 C174 7D40

Attachment: pgpAO_67Z3b1H.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]