[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: io.read() returns immediately under VxWorks
- From: Matthew Paul Del Buono <delbu9c1@...>
- Date: Fri, 27 Jun 2008 09:03:09 -0400 (EDT)
---- Original message ----
>Date: Fri, 27 Jun 2008 11:37:41 +0100
>From: David Given <dg@cowlark.com>
>Subject: Re: io.read() returns immediately under VxWorks
>To: Lua list <lua@bazar2.conectiva.com.br>
>
>rogerz wrote:
>[...]
>> It runs well under cygwin. But when I run the lua script under VxWorks by
>> vxLuaGlue. System DOES NOT wait for my input ever. It just print menu
>> repeatly. It seems io.read() always returns immediately. Can anyone give me
>> some advice on it?
>
>That sounds as if io.read() is returning EOF --- check it for a nil
>return value. IIRC, VxWorks doesn't really have stdio, but does have
>some functions that will allow you to access the console; does vxLuaGlue
>use these or does it just disallow stdin/stdout?
>
>--
>David Given
>dg@cowlark.com
>
>
On this note, VxWorks (at least the version I work with) still has the standard functions gets(), scanf(), etc. so if you need to, you can always write a wrapper for them in C fairly easily. These functions do block by default. However, it does seem odd to me that their file-based counterparts wouldn't work.
-- Matthew P. Del Buono