gprocess

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2025 License: MIT Imports: 2 Imported by: 0

README

gprocess 包

简介

gprocess 包提供了进程管理相关的工具函数。

功能特性

  • 进程信息:获取进程信息
  • 进程控制:启动、停止进程
  • 进程监控:监控进程状态

安装

go get github.com/snail007/gmc/util/process

相关链接

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Daemon

func Daemon(mainFunc func(), onKill func()) (err error)

Daemon make your program ability of 1.daemonize 2.forever 3.logging stdout to file. If you used Daemon, you can run your program with arguments `--daemon` `--forever` `--flog foo.log` optionally. If you want to disable logging, specify the -flog null. mainFunc is your `main`, if onKill not nil, it will be called when one signal of syscall.SIGHUP, syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT received,

Types

This section is empty.

Directories

Path Synopsis
Package gdaemon does add daemon, logging and forever function to your program.
Package gdaemon does add daemon, logging and forever function to your program.
Package ghook package does prevent your program main function to exit when all your worker code in goroutine.
Package ghook package does prevent your program main function to exit when all your worker code in goroutine.
Package gprofiling package help you do profiling your program in easy way.
Package gprofiling package help you do profiling your program in easy way.

Jump to

Keyboard shortcuts

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