diff options
author | Daniel Milde <daniel@milde.cz> | 2023-05-31 23:06:57 +0200 |
---|---|---|
committer | Daniel Milde <daniel@milde.cz> | 2023-05-31 23:06:57 +0200 |
commit | a51e0624bf3a8663fd71ddd8dbee3bd257400e79 (patch) | |
tree | 4b5792e6aacd4a6b5cb708a6d2bbae9fe0df26b1 | |
parent | c43c7db07cd4cacca59085ddf6d02afaea0cdacc (diff) |
fix: stop process for windowsv5.24.0
-rw-r--r-- | tui/exec_other.go | 5 | ||||
-rw-r--r-- | tui/exec_windows.go | 4 | ||||
-rw-r--r-- | tui/keys.go | 3 |
3 files changed, 10 insertions, 2 deletions
diff --git a/tui/exec_other.go b/tui/exec_other.go index 081462b..6fd0b91 100644 --- a/tui/exec_other.go +++ b/tui/exec_other.go @@ -5,6 +5,7 @@ package tui import (
"os"
+ "syscall"
)
func getShellBin() string {
@@ -31,3 +32,7 @@ func (ui *UI) spawnShell() { }
})
}
+
+func stopProcess() error {
+ return syscall.Kill(syscall.Getpid(), syscall.SIGTSTP)
+}
diff --git a/tui/exec_windows.go b/tui/exec_windows.go index 2f91740..def10f0 100644 --- a/tui/exec_windows.go +++ b/tui/exec_windows.go @@ -27,3 +27,7 @@ func (ui *UI) spawnShell() { ui.showErr("Error executing shell", err)
}
}
+
+func stopProcess() error {
+ return nil
+}
diff --git a/tui/keys.go b/tui/keys.go index 6c4dc57..76629dc 100644 --- a/tui/keys.go +++ b/tui/keys.go @@ -2,7 +2,6 @@ package tui import ( "fmt" - "syscall" "github.com/dundee/gdu/v5/pkg/fs" "github.com/gdamore/tcell/v2" @@ -121,7 +120,7 @@ func (ui *UI) handleCtrlZ(key *tcell.EventKey) *tcell.EventKey { termApp.Lock() defer termApp.Unlock() - err := syscall.Kill(syscall.Getpid(), syscall.SIGTSTP) + err := stopProcess() if err != nil { ui.showErr("Error sending STOP signal", err) } |