mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-26 21:53:48 +03:00
16 lines
225 B
Go
16 lines
225 B
Go
// +build !windows
|
|
|
|
package caddycmd
|
|
|
|
import (
|
|
"fmt"
|
|
"syscall"
|
|
)
|
|
|
|
func gracefullyStopProcess(pid int) error {
|
|
err := syscall.Kill(pid, syscall.SIGINT)
|
|
if err != nil {
|
|
return fmt.Errorf("kill: %v", err)
|
|
}
|
|
return nil
|
|
}
|