mirror of https://github.com/caddyserver/caddy.git
17 lines
225 B
Go
17 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
|
||
|
}
|