UtilityProcess

external class UtilityProcess(source)

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val errorEvent: <Error class: unknown class><<Error class: unknown class><String, String, String>>
Link copied to clipboard
val exitEvent: <Error class: unknown class><<Error class: unknown class><Double>>
Link copied to clipboard
val messageEvent: <Error class: unknown class><<Error class: unknown class><Any?>>
Link copied to clipboard
var pid: Double?

A Integer | undefined representing the process identifier (PID) of the child process. Until the child process has spawned successfully, the value is undefined. When the child process exits, then the value is undefined after the exit event is emitted.

Link copied to clipboard
val spawnEvent: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
var stderr: <Error class: unknown class>?

A NodeJS.ReadableStream | null that represents the child process's stderr. If the child was spawned with options.stdio2 set to anything other than 'pipe', then this will be null. When the child process exits, then the value is null after the exit event is emitted.

Link copied to clipboard
var stdout: <Error class: unknown class>?

A NodeJS.ReadableStream | null that represents the child process's stdout. If the child was spawned with options.stdio1 set to anything other than 'pipe', then this will be null. When the child process exits, then the value is null after the exit event is emitted.

Functions

Link copied to clipboard
fun kill(): Boolean

Terminates the process gracefully. On POSIX, it uses SIGTERM but will ensure the process is reaped on exit. This function returns true if the kill is successful, and false otherwise.

Link copied to clipboard
fun postMessage(message: Any?, transfer: <Error class: unknown class><MessagePortMain> = definedExternally)

Send a message to the child process, optionally transferring ownership of zero or more MessagePortMain objects.