+ service: support "-s reload" command

This commit is contained in:
Simon Zolin
2020-02-18 16:01:32 +03:00
parent fa2f793ac7
commit c77907694d
5 changed files with 70 additions and 2 deletions

View File

@@ -25,3 +25,8 @@ func SetRlimit(val uint) {
func HaveAdminRights() (bool, error) {
return os.Getuid() == 0, nil
}
// SendProcessSignal - send signal to a process
func SendProcessSignal(pid int, sig syscall.Signal) error {
return syscall.Kill(pid, sig)
}