mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-31 09:21:18 -05:00
Bumps [github.com/gookit/config/v2](https://github.com/gookit/config) from 2.1.8 to 2.2.2. - [Release notes](https://github.com/gookit/config/releases) - [Commits](https://github.com/gookit/config/compare/v2.1.8...v2.2.2) --- updated-dependencies: - dependency-name: github.com/gookit/config/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
18 lines
291 B
Go
18 lines
291 B
Go
//go:build !windows
|
|
|
|
package sysutil
|
|
|
|
import (
|
|
"syscall"
|
|
)
|
|
|
|
// Kill a process by pid
|
|
func Kill(pid int, signal syscall.Signal) error {
|
|
return syscall.Kill(pid, signal)
|
|
}
|
|
|
|
// ProcessExists check process exists by pid
|
|
func ProcessExists(pid int) bool {
|
|
return nil == syscall.Kill(pid, 0)
|
|
}
|