Skip to content
Tauri
Releases

process

Perform operations on the current process.

This package is also accessible with window.__TAURI__.process when build.withGlobalTauri in tauri.conf.json is set to true.

Functions

exit()

exit(exitCode = 0): Promise< void >

Exits immediately with the given exitCode.

Example

import { exit } from '@tauri-apps/api/process';
await exit(1);

Since

1.0.0

Parameters

ParameterTypeDefault valueDescription
exitCodenumber0The exit code to use.

Returns

Promise< void >

A promise indicating the success or failure of the operation.

Source: process.ts:27


relaunch()

relaunch(): Promise< void >

Exits the current instance of the app then relaunches it.

Example

import { relaunch } from '@tauri-apps/api/process';
await relaunch();

Since

1.0.0

Returns

Promise< void >

A promise indicating the success or failure of the operation.

Source: process.ts:49


© 2024 Tauri Contributors. CC-BY / MIT