Header menu logo fable-electron-docs-api

UtilityProcess Type

⚠ Process Availability: Main ✔ | Renderer ✔ | Utility ✔ | Exported ❌

Instance members

Instance member Description

this.kill ()

Full Usage: this.kill ()

Returns: bool
Modifiers: inline

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.

Returns: bool

this.offError handler

Full Usage: this.offError handler

Parameters:
Modifiers: inline

Emitted when the child process needs to terminate due to non continuable error from V8.No matter if you listen to the error event, the exit event will be emitted after the child process terminates.

handler : IOnError -> unit

this.offError handler

Full Usage: this.offError handler

Parameters:
    handler : Type -> string -> string -> unit

Modifiers: inline

Emitted when the child process needs to terminate due to non continuable error from V8.No matter if you listen to the error event, the exit event will be emitted after the child process terminates.

handler : Type -> string -> string -> unit

this.offExit handler

Full Usage: this.offExit handler

Parameters:
    handler : float -> unit

Modifiers: inline

Emitted after the child process ends.

handler : float -> unit

this.offMessage handler

Full Usage: this.offMessage handler

Parameters:
    handler : obj -> unit

Modifiers: inline

Emitted when the child process sends a message using process.parentPort.postMessage().

handler : obj -> unit

this.offSpawn handler

Full Usage: this.offSpawn handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Emitted once the child process has spawned successfully.

handler : unit -> unit

this.onError handler

Full Usage: this.onError handler

Parameters:
Modifiers: inline

Emitted when the child process needs to terminate due to non continuable error from V8.No matter if you listen to the error event, the exit event will be emitted after the child process terminates.

handler : IOnError -> unit

this.onError handler

Full Usage: this.onError handler

Parameters:
    handler : Type -> string -> string -> unit

Modifiers: inline

Emitted when the child process needs to terminate due to non continuable error from V8.No matter if you listen to the error event, the exit event will be emitted after the child process terminates.

handler : Type -> string -> string -> unit

this.onExit handler

Full Usage: this.onExit handler

Parameters:
    handler : float -> unit

Modifiers: inline

Emitted after the child process ends.

handler : float -> unit

this.onMessage handler

Full Usage: this.onMessage handler

Parameters:
    handler : obj -> unit

Modifiers: inline

Emitted when the child process sends a message using process.parentPort.postMessage().

handler : obj -> unit

this.onSpawn handler

Full Usage: this.onSpawn handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Emitted once the child process has spawned successfully.

handler : unit -> unit

this.onceError handler

Full Usage: this.onceError handler

Parameters:
Modifiers: inline

Emitted when the child process needs to terminate due to non continuable error from V8.No matter if you listen to the error event, the exit event will be emitted after the child process terminates.

handler : IOnError -> unit

this.onceError handler

Full Usage: this.onceError handler

Parameters:
    handler : Type -> string -> string -> unit

Modifiers: inline

Emitted when the child process needs to terminate due to non continuable error from V8.No matter if you listen to the error event, the exit event will be emitted after the child process terminates.

handler : Type -> string -> string -> unit

this.onceExit handler

Full Usage: this.onceExit handler

Parameters:
    handler : float -> unit

Modifiers: inline

Emitted after the child process ends.

handler : float -> unit

this.onceMessage handler

Full Usage: this.onceMessage handler

Parameters:
    handler : obj -> unit

Modifiers: inline

Emitted when the child process sends a message using process.parentPort.postMessage().

handler : obj -> unit

this.onceSpawn handler

Full Usage: this.onceSpawn handler

Parameters:
    handler : unit -> unit

Modifiers: inline

Emitted once the child process has spawned successfully.

handler : unit -> unit

this.pid

Full Usage: this.pid

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.> [!NOTE] You can use the pid to determine if the process is currently running.

this.postMessage (message, ?transfer)

Full Usage: this.postMessage (message, ?transfer)

Parameters:
Modifiers: inline

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

message : obj
?transfer : MessagePortMain[]

this.stderr

Full Usage: this.stderr

A NodeJS.ReadableStream | null that represents the child process's stderr. If the child was spawned with options.stdio[2] 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.

this.stdout

Full Usage: this.stdout

A NodeJS.ReadableStream | null that represents the child process's stdout. If the child was spawned with options.stdio[1] 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.

Type something to start searching.