lua-users home
lua-l archive

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


On Fri, 27 Jun 2008, Matthew Paul Del Buono wrote:
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?

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.

I have had no difficulty with vxWorks 5.5 running Lua 5.1. However, I
don't know anything about this VxLuaGlue thingie; I just built the
standard distribution using the vxWorks compiler. There were two Lua
headers I had to add <vxworks.h> to, but made no other changes.

I have done both console I/O with io.read() and file I/O using
file:read(). However, on those occasions in which I wanted to do
raw console I/O, I used some of my own routines instead of io.read().

Of course, now that I've spoken up, I'm out the door for a week of
vacation, so I won't see any replies for a while...
--
roger ivie
rivie@ridgenet.net