github.com/outbrain/consul@v1.4.5/command/lock/util_windows.go (about)

     1  // +build windows
     2  
     3  package lock
     4  
     5  import (
     6  	"os"
     7  	"syscall"
     8  )
     9  
    10  // signalPid sends a sig signal to the process with process id pid.
    11  // Since interrupts et al is not implemented on Windows, signalPid
    12  // always sends a SIGKILL signal irrespective of the sig value.
    13  func signalPid(pid int, sig syscall.Signal) error {
    14  	p, err := os.FindProcess(pid)
    15  	if err != nil {
    16  		return err
    17  	}
    18  	_ = sig
    19  	return p.Signal(syscall.SIGKILL)
    20  }