process

package
v0.4.37 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package process provides utilities for managing the current system process.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exit

func Exit(code int)

Exit runs the registered exit handlers, as if the os.Interrupt signal had been sent, and then terminates the process with the given status code. Exit blocks until the process terminates if it has already been called elsewhere.

func SetExitHandler

func SetExitHandler(handler func())

SetExitHandler registers the given handler function to run when receiving os.Interrupt or SIGTERM signals. Registered handlers are executed in reverse order of when they were set.

func SetSignalHandler

func SetSignalHandler(signal os.Signal, handler func())

SetSignalHandler registers the given handler function to run when receiving the specified signal. Registered handlers are executed in reverse order of when they were set.

Types

This section is empty.

Jump to

Keyboard shortcuts

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