klyn.process.Process.execute
method
public static execute(
commandLine as List<String>,
inputString as String = null,
timeout as ULong = 0ul,
inheritError as Boolean = false
) as ProcessResults
Description

Executes a command line.

Parameters
ParameterDescription
commandLineCommand and arguments.
inputStringOptional standard input payload (null by default). The text is encoded as UTF-8 without changing whitespace, line endings or embedded U+0000 characters.
timeoutMaximum execution time in milliseconds. A value of zero disables timeout enforcement.
inheritErrorSend child standard error directly to the parent's standard error instead of capturing it. Useful for interactive progress; the child retains the terminal width and can observe console resizes.
Returns

A typed ProcessResults object.

Example
result = Process.execute(["klyn", "--version"], timeout=5_000ul)
assert not result.timedOut
assert result.exitCode == 0
# Let an external tool display its progress live on standard error.
result = Process.execute(["curl", "--progress-bar", "--output", "page.html", "https://example.com"], inheritError=true)