[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: How to run in background through forking in Lua?
- From: Steve Litt <slitt@...>
- Date: Mon, 3 Jan 2011 15:24:41 -0500
On Monday 03 January 2011 10:03:43 steve donovan wrote:
> On Mon, Jan 3, 2011 at 5:00 PM, Steve Litt <slitt@troubleshooters.com>
wrote:
> > I inserted require("luaposix") at the top of my program, and it errored
> > out with "module 'luaposix' not found".
>
> The module name is just 'posix', so require("posix") should work. Just
> one of the little gotchas; what the library calls itself isn't
> necessarily the name of the module (e.g. Luafilesystem/lfs,
> luaexpat/lxp, etc)
>
> steve d.
Same symptom with require("posix"):
========================================
slitt@mydesk:~/ulua/program$ ./test.lua
/usr/bin/lua: ./test.lua:2: module 'posix' not found:
no field package.preload['posix']
no file './posix.lua'
no file '/usr/local/share/lua/5.1/posix.lua'
no file '/usr/local/share/lua/5.1/posix/init.lua'
no file '/usr/local/lib/lua/5.1/posix.lua'
no file '/usr/local/lib/lua/5.1/posix/init.lua'
no file '/usr/share/lua/5.1/posix.lua'
no file '/usr/share/lua/5.1/posix/init.lua'
no file './posix.so'
no file '/usr/local/lib/lua/5.1/posix.so'
no file '/usr/lib/lua/5.1/posix.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
[C]: in function 'require'
./test.lua:2: in main chunk
[C]: ?
slitt@mydesk:~/ulua/program$
========================================
So I'll probably just do it in C.
Thanks
SteveT
Steve Litt
Recession Relief Package
http://www.recession-relief.US
Twitter: http://www.twitter.com/stevelitt