[Top][All Lists]

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

Re: [gforth] problem with gforth7 and serial access

From: Bernd Paysan
Subject: Re: [gforth] problem with gforth7 and serial access
Date: Wed, 04 Apr 2012 01:11:34 +0200
User-agent: KMail/4.7.2 (Linux/3.1.9-1.4-desktop; KDE/4.7.2; x86_64; ; )

Am Dienstag, 3. April 2012, 14:11:58 schrieb kibler:
> I got the clear feeling no-one was interested enough to want to see
> our code, especially since I had read so many previous emails covering
> the same topic without any positive responses.

Where have you read that?  For me, this bug is new, you started the report.

> We set serial by doing a system call to stty.

Ok, I see.

> We only use gforth system
> calls to open/close/read/write/check file handles that happen to be serial
> devices. gforth should do those fine without any knowledge of them
> being tty, USB, or a socket driver.

Well, in theory, yes.  But in practice, the serial device requires 
ioctl(FIONREAD) to check whether there is data available, files require 
select, and the keyboard input can do both.

The current CVS of Gforth now contains an io.c, which should properly select 
the two possible methods (FIONREAD on ttys, select on all others) and 
therefore be more robust than the current approach. I still think the reaction 
of select() is a bug in Linux.

Bernd Paysan
"If you want it done right, you have to do it yourself"

Attachment: signature.asc
Description: This is a digitally signed message part.

reply via email to

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