Skip to content
Tauri 中文网

@tauri-apps/plugin-process

Perform operations on the current process.

Functions

exit()

function exit(code): Promise<void>

Exits immediately with the given exitCode.

Parameters

ParameterTypeDefault valueDescription
codenumber0The exit code to use.

Returns

Promise<void>

A promise indicating the success or failure of the operation.

Example

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

Since

2.0.0

Source: undefined


relaunch()

function relaunch(): Promise<void>

Exits the current instance of the app then relaunches it.

Returns

Promise<void>

A promise indicating the success or failure of the operation.

Example

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

Since

2.0.0

Source: undefined


Tauri 中文网 - 粤ICP备13048890号