restart

package
v2.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2026 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BinaryPath

func BinaryPath() (string, error)

BinaryPath returns the path to the binary that should be exec'd on restart. For daemon subprocesses (ZAPAROO_APP set), this is the original binary path. Otherwise it is the current executable path.

func Exec

func Exec() error

Exec replaces the current process with the updated binary. On Unix this uses syscall.Exec which atomically replaces the process (same PID). It does not return on success.

func ExecIfRequested

func ExecIfRequested(restartRequested func() bool) error

ExecIfRequested checks whether a restart was requested and, if so, re-execs the binary. Returns nil if no restart was requested. On success, the process is replaced (Unix) or a new process is spawned and the old one exits (Windows), so this function does not return on success.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL