Added toolbar with start and stop button
This commit is contained in:
@ -6,6 +6,7 @@ local M = {
|
||||
name = "shell"
|
||||
}
|
||||
|
||||
-- Run a shell command
|
||||
function M:run(cmd, opts, name)
|
||||
core.log("[jpdebug] Running shell command")
|
||||
if cmd then
|
||||
@ -16,5 +17,30 @@ function M:run(cmd, opts, name)
|
||||
end
|
||||
end
|
||||
|
||||
-- Wait untill it ends, possibly with timeout
|
||||
function M:wait(proc, time)
|
||||
return proc:wait(time)
|
||||
end
|
||||
|
||||
-- Read the stdout, returns nil if process has stopped
|
||||
function M:read_stdout(proc)
|
||||
return proc:read_stdout()
|
||||
end
|
||||
|
||||
-- Read the stderr
|
||||
function M:read_stderr(proc)
|
||||
return proc:read_stderr()
|
||||
end
|
||||
|
||||
-- Kill the process
|
||||
function M:kill(proc)
|
||||
proc:kill()
|
||||
end
|
||||
|
||||
-- Terminate the process
|
||||
function M:terminate(proc)
|
||||
proc:terminate()
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
|
||||
Reference in New Issue
Block a user