Files
archived-tauri-docs/docs/api/js/modules/process.md
2022-07-11 18:09:42 +01:00

1.1 KiB

@tauri-apps/api / process

Module: 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?): Promise<void>

Exits immediately with the given exitCode.

Example

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

Parameters

Name Type Default value Description
exitCode number 0 The exit code to use.

Returns

Promise<void>

A promise indicating the success or failure of the operation.


relaunch

relaunch(): Promise<void>

Exits the current instance of the app then relaunches it.

Example

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

Returns

Promise<void>

A promise indicating the success or failure of the operation.