Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Spawn callback #9
I modified the luaH_luakit_spawn (luah.c) to allow defining Lua callbacks for async-spawned processes, which get called once the spawned process finishes.
the Lua callback function receives 4 arguments: kind of process termination, code of process termination, stdout for the process, stderr for the process.
An example of how to use it is available in lib/async_call_example.lua
I think the functions I added could use some better names, but I'm not so familiar with the naming scheme used.
Can you look at the code, propose corrections/modifications if neccessary, and eventually merge this? Thanks