mirror of
https://github.com/holub/mame
synced 2025-06-05 20:33:45 +03:00
25 lines
384 B
Lua
25 lines
384 B
Lua
local p = require('lib/utils').prettyPrint
|
|
local uv = require('luv')
|
|
|
|
|
|
|
|
local child, pid
|
|
child, pid = uv.spawn("sleep", {
|
|
args = {"100"}
|
|
}, function (code, signal)
|
|
p("EXIT", {code=code,signal=signal})
|
|
uv.close(child)
|
|
end)
|
|
|
|
p{child=child, pid=pid}
|
|
|
|
-- uv.kill(pid, "SIGTERM")
|
|
uv.process_kill(child, "SIGTERM")
|
|
|
|
repeat
|
|
print("\ntick.")
|
|
until uv.run('once') == 0
|
|
|
|
print("done")
|
|
|