Process:spawn([suspended])method

Starts the process execution.

Parameters

[suspended]

An optional boolean value indicating if the process should be suspended once spawn, defaulting to false.

Return value

This method returns a Task instance that will run until the process stops its execution.

Example

--! luart-extensions import sysutils local ui = require "ui" -- create a process launching Wordpad local p = sysutils.Process("notepad.exe") -- start the process local task = p:spawn() -- wait until the process is terminatedawait ntask ui.info("Notepad process has terminated its execution")