lua-users home
lua-l archive

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

On Sun, Apr 29, 2018 at 10:21 AM, Axel Kittenberger <> wrote:
I don't quite see how these dynamic library shenanigans are better than a wrapper script. If a fork() that a shell wrapper would do, sounds like an too expensive syscall, simply write a c wrapper, that directly calls execvp() which keeps the process and just replaces the running binary with another one. I don't know and didn't bother to research, but I can't imagine that execvp() is much more expensive than dlopen() anyway.
Scripts add complexity. While I'm currently playing on Windows, I want this to be supportable on RTEMS. Ultimately the same C Lua uses is the most portable, easiest way to achieve my goal. By easiest, I mean 'put my big boy pants on' and improve my C.

However, eventually I don't see why lua -51 is any better in a script compared to say lua-51  or simply ${LUA} which is a variable to what lua you detected before, or been configured for.

I may be totally wrong. That's half the fun of the adventure. :)