summaryrefslogtreecommitdiff
path: root/cmd/proc_posix.go
blob: 6b71d1ae7ed9e12cab7d6eda095e7b7b077b67e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// +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
}