lua-users home
lua-l archive

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


Ken Smith <kgsmith <at> gmail.com> writes:
> Firstly, I ran into a couple issues building Luaproc.  On OS X,
> /usr/include/pthread.h includes a file called sched.h so I had to
> rename Luaproc's sched.h to something else.  Also, because I built Lua
> as C++, I needed to build Luaproc as C++ so I had to extern "C"
> luaopen_luaproc.  Finally, I had to add -bundle -undefined
> dynamic_lookup to the link per
> http://lua-users.org/wiki/BuildingModules despite that page's own
> indication to the contrary.

greetings ken,

first, i´m glad you decided to try luaproc out.

we already had at least one report about problems with include files when
building on mac. i'll be looking into that issue.

> Once that was up and running, I wrote this into experiment.lua:
> require "luaproc"
> EOF
> 
> This segfaults:
> If I change experiment.lua to this:
> require "luaproc"
> 
> luaproc.exit()
> EOF
> 
> It exits normally.  For now, I'll take care to give Luaproc a chance
> to clean up by always calling exit() but I thought the developers
> would like to know of this behavior.  Please let me know if you would
> like more information.

that is odd. calling luaproc.exit() is required just to ensure all workers have
finished executing before exiting the main thread. so, not calling it should
simply mean you risk having the main thread exit before workers have finished
executing. i don't think it should segfault. i'll try to get my hands on a mac
in order to build luaproc as you described and investigate the issue.

i'd be grateful if you could post any further information you might find
relevant to reproduce this condition.

--alexandre