summaryrefslogtreecommitdiffstats
path: root/TOOLS/lua/command-test.lua
diff options
context:
space:
mode:
Diffstat (limited to 'TOOLS/lua/command-test.lua')
-rw-r--r--TOOLS/lua/command-test.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/TOOLS/lua/command-test.lua b/TOOLS/lua/command-test.lua
index 94a91c2f57..1a8d86b4dd 100644
--- a/TOOLS/lua/command-test.lua
+++ b/TOOLS/lua/command-test.lua
@@ -55,4 +55,13 @@ mp.observe_property("vo-configured", "bool", function(_, v)
function(res, val, err)
print("done subprocess: " .. join(" ", {res, val, err}))
end)
+
+ local x = mp.command_native_async({name = "subprocess", args = {"sleep", "inf"}},
+ function(res, val, err)
+ print("done sleep inf subprocess: " .. join(" ", {res, val, err}))
+ end)
+ mp.add_timeout(15, function()
+ print("aborting sleep inf subprocess after timeout")
+ mp.abort_async_command(x)
+ end)
end)