package
Version:
v2.0.17
Opens a new window with list of versions in this module.
Published: May 23, 2023
License: Apache-2.0
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
func MonitorExitSignal(exitFunc func(os.Signal))
MonitorExitSignal 监听退出信号(拦截关闭信号)
缺陷: 部分信号(e.g. syscall.SIGSTOP、syscall.SIGKILL)无法被拦截.
@param exitFunc (1) 可以为nil
(2) 一般用于清理痕迹(毁尸灭迹)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.