2016-05-27 19:08:18 +02:00
|
|
|
--- Tests for spawn + signals
|
|
|
|
|
|
|
|
local runner = require("_runner")
|
|
|
|
|
|
|
|
local done = false
|
|
|
|
|
|
|
|
local function exit_callback(cause, signal)
|
|
|
|
assert(cause == "signal", cause)
|
|
|
|
assert(signal == awesome.unix_signal.SIGKILL, signal)
|
|
|
|
done = true
|
|
|
|
end
|
|
|
|
local pid = awesome.spawn({"/bin/sh", "-c", "sleep 60"}, false, false,
|
2016-12-27 21:39:08 +01:00
|
|
|
false, false, exit_callback)
|
2016-05-27 19:08:18 +02:00
|
|
|
awesome.kill(pid, awesome.unix_signal.SIGKILL)
|
|
|
|
|
|
|
|
runner.run_steps({
|
2016-12-27 21:39:08 +01:00
|
|
|
function()
|
|
|
|
if done then
|
|
|
|
return true
|
|
|
|
end
|
|
|
|
end
|
|
|
|
})
|
2016-05-27 19:08:18 +02:00
|
|
|
|
|
|
|
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|