diff options
-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) } |