summaryrefslogtreecommitdiff
path: root/cmd/proc_posix.go
diff options
context:
space:
mode:
authorToby Allen <tobyallen@toflidium.com>2019-07-20 17:44:54 +0100
committerMatt Holt <mholt@users.noreply.github.com>2019-07-20 10:44:54 -0600
commitb855e661700fa8f9176f29c3c5b1cebd4cc09351 (patch)
treeb88fcd62af8ba934182b9cdc065b0fe6fb7d9ee2 /cmd/proc_posix.go
parent0d3f99e85a089a6a772ae38f426b5cd5f2f4583f (diff)
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
Diffstat (limited to 'cmd/proc_posix.go')
-rw-r--r--cmd/proc_posix.go5
1 files changed, 5 insertions, 0 deletions
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])
+}