Class Process

Process handle returned by Process.new()

If the handle goes out of scope the process may get killed. (This is not guaranteed)

See also process
Example
function notepad()
  local p = Process.new("notepad.exe", "file.txt")
  if p:alive() then
    print("it's alive")
    local code = p:join()
    print("Process returned with", code)
  end
end

Synopsis

Methods
alive()

Is the process alive

join()

Join the process (blocking)

detach()

Detach the process letting it run freely

kill()

Kill the process

Process:alive()

Is the process alive

Return Values
(bool)

isAlive

Process:join()

Join the process (blocking)

Return Values
(number)

Return code

Process:detach()

Detach the process letting it run freely

Return Values
(nil)
Process:kill()

Kill the process

Return Values
(nil)