@@ -11,7 +11,6 @@ import (
1111 "runtime"
1212 "strings"
1313 "sync"
14- "syscall"
1514
1615 "fyne.io/fyne/v2"
1716 "fyne.io/fyne/v2/app"
@@ -56,17 +55,6 @@ func (pm *ProcessManager) StopAll() {
5655 }
5756}
5857
59- // killProcessGroup kills a process and all its children
60- func killProcessGroup (pid int ) {
61- // On Unix, kill the process group by using negative PID
62- if runtime .GOOS != "windows" {
63- syscall .Kill (- pid , syscall .SIGKILL )
64- } else {
65- // On Windows, use taskkill /T to kill tree
66- exec .Command ("taskkill" , "/F" , "/T" , "/PID" , fmt .Sprint (pid )).Run ()
67- }
68- }
69-
7058// killProcessByPort kills any process listening on the specified port
7159func killProcessByPort (port string ) error {
7260 if runtime .GOOS == "windows" {
@@ -79,13 +67,6 @@ func killProcessByPort(port string) error {
7967 return cmd .Run ()
8068}
8169
82- // setupProcessGroup configures cmd to run in its own process group
83- func setupProcessGroup (cmd * exec.Cmd ) {
84- if runtime .GOOS != "windows" {
85- cmd .SysProcAttr = & syscall.SysProcAttr {Setpgid : true }
86- }
87- }
88-
8970func checkCommand (name string , args ... string ) (bool , string ) {
9071 cmd := exec .Command (name , args ... )
9172 output , err := cmd .Output ()
0 commit comments