From b855e661700fa8f9176f29c3c5b1cebd4cc09351 Mon Sep 17 00:00:00 2001 From: Toby Allen Date: Sat, 20 Jul 2019 17:44:54 +0100 Subject: Force quit on Windows with taskkill /f (#2670) * Force quit /f on windows, also check for processname '.exe' on windows. * Remove unneeded spaces * fix tabs * go fmt tabs * Return consistent appname which always includes .exe * Change func name --- cmd/proc_posix.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'cmd/proc_posix.go') diff --git a/cmd/proc_posix.go b/cmd/proc_posix.go index 2cb4b9a..da586e0 100644 --- a/cmd/proc_posix.go +++ b/cmd/proc_posix.go @@ -22,9 +22,14 @@ import ( ) func gracefullyStopProcess(pid int) error { + fmt.Printf("Graceful stop...") err := syscall.Kill(pid, syscall.SIGINT) if err != nil { return fmt.Errorf("kill: %v", err) } return nil } + +func getProcessName() string { + return filepath.Base(os.Args[0]) +} -- cgit v1.2.3