Moved suicide code out to platform specific files
This commit is contained in:
parent
a7487dadd7
commit
080b8ecaff
3 changed files with 20 additions and 2 deletions
12
act/artifactcache/handler_windows.go
Normal file
12
act/artifactcache/handler_windows.go
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
package artifactcache
|
||||
|
||||
import "syscall"
|
||||
|
||||
func suicide() error {
|
||||
handle, err := syscall.GetCurrentProcess()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return syscall.TerminateProcess(handle, uint32(syscall.SIGTERM))
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue