execve

abstract val execve: (file: String, @R|kotlin/ParameterName|(name = String(args)) ERROR CLASS: Symbol not found for ReadonlyArray<kotlin/String>??, env: ProcessEnv?) -> Nothing?(source)

Replaces the current process with a new process.

This is achieved by using the execve POSIX function and therefore no memory or other resources from the current process are preserved, except for the standard input, standard output and standard error file descriptor.

All other resources are discarded by the system when the processes are swapped, without triggering any exit or close events and without running any cleanup handler.

This function will never return, unless an error occurred.

This function is not available on Windows or IBM i.

Since

v22.15.0

Parameters

file

The name or path of the executable file to run.

args

List of string arguments. No argument can contain a null-byte (\u0000).

env

Environment key-value pairs. No key or value can contain a null-byte (\u0000). Default: process.env.