A lua library to spawn programs
posix_spawn
family of functionsCurrently only works on POSIXy systems, but the high level module should be portable to Windows; someone just needs to put the work in.
It's recommended to install lua-spawn by using luarocks. This will automatically install run-time lua dependencies for you.
$ luarocks install spawn
Spawning a new child program from a lua script is surprisingly hard.
Existing solutions:
os.execute
doesn't allow interaction with any file descriptorsio.popen
only allows interaction with one of stdin
or stdout
fork
+ exec
isn't portable to non-MMU or non-unix architecturesThis project uses the posix_spawn
family of functions.