launch --hold: Fix hold not working if kernel signals process group with SIGINT
Fixes #7466
This commit is contained in:
parent
506d7a4369
commit
3f6b1a9d81
2 changed files with 12 additions and 1 deletions
|
|
@ -94,6 +94,8 @@ Detailed list of changes
|
|||
|
||||
- Fix kitten @ set-background-opacity limited to min opacity of 0.1 instead of 0 (:iss:`7463`)
|
||||
|
||||
- launch --hold: Fix hold not working if kernel signals process group with SIGINT (:iss:`7466`)
|
||||
|
||||
0.34.1 [2024-04-19]
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import (
|
|||
"kitty"
|
||||
"os"
|
||||
"os/exec"
|
||||
"os/signal"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
|
|
@ -216,7 +217,15 @@ func RunCommandRestoringTerminalToSaneStateAfter(cmd []string) {
|
|||
defer term.Close()
|
||||
}
|
||||
}
|
||||
err = c.Run()
|
||||
func() {
|
||||
if err = c.Start(); err != nil {
|
||||
fmt.Fprintln(os.Stderr, cmd[0], "failed with error:", err)
|
||||
return
|
||||
}
|
||||
signal.Ignore(os.Interrupt)
|
||||
defer signal.Reset(os.Interrupt)
|
||||
err = c.Wait()
|
||||
}()
|
||||
if err != nil {
|
||||
fmt.Fprintln(os.Stderr, cmd[0], "failed with error:", err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue