osinterrupt

package module
v0.0.0-...-3280beb Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2017 License: GPL-3.0 Imports: 4 Imported by: 0

README

osinterrupt

OS signal handler

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleInterruptSignal

func HandleInterruptSignal(callback func())

Handle SIGINT (Ctrl+C) and call callback function before exit

func HandleSignal

func HandleSignal(signalCode syscall.Signal, callback func())

Handle signal and call callback function before exit

func HandleTerminateSignal

func HandleTerminateSignal(callback func())

Handle SIGTERM and call callback function before exit

func PrintMessageOnInterruptSignal

func PrintMessageOnInterruptSignal(message string)

Print message on SIGINT (Ctrl+C) before exit

Types

This section is empty.

Jump to

Keyboard shortcuts

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