mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 14:18:26 +02:00
Fix #8754
This commit is contained in:
@@ -130,6 +130,8 @@ Detailed list of changes
|
||||
|
||||
- Fix a regression in 0.40.0 that broke serialization of tab characters as ANSI text (:iss:`8741`)
|
||||
|
||||
- kitten run-shell: Fix SIGINT blocked when execing the shell (:iss:`8754`)
|
||||
|
||||
0.42.1 [2025-05-17]
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
@@ -142,10 +142,8 @@ func rc_modification_allowed(ksi string) (allowed bool, set_ksi_env_var bool) {
|
||||
case "disabled":
|
||||
allowed = false
|
||||
set_ksi_env_var = false
|
||||
break
|
||||
case "no-rc":
|
||||
allowed = false
|
||||
break
|
||||
}
|
||||
}
|
||||
return
|
||||
@@ -232,17 +230,17 @@ func RunCommandRestoringTerminalToSaneStateAfter(cmd []string) {
|
||||
defer term.Close()
|
||||
}
|
||||
}
|
||||
func() {
|
||||
if err = c.Start(); err != nil {
|
||||
fmt.Fprintln(os.Stderr, cmd[0], "failed to start with error:", err)
|
||||
return
|
||||
}
|
||||
// Ignore SIGINT as the kernel tends to send it to us as well as the
|
||||
// subprocess on Ctrl+C
|
||||
signal.Ignore(os.Interrupt)
|
||||
defer signal.Reset(os.Interrupt)
|
||||
err = c.Wait()
|
||||
}()
|
||||
// Ignore SIGINT as the kernel tends to send it to us as well as the
|
||||
// subprocess on Ctrl+C. We cant use signal.Ignore as it doesnt reset
|
||||
// sigprocmask so subsequent unix.Exec will inherit blocked SIGINT
|
||||
ignore_sigint_channel := make(chan os.Signal, 512)
|
||||
if err = c.Start(); err != nil {
|
||||
fmt.Fprintln(os.Stderr, cmd[0], "failed to start with error:", err)
|
||||
return
|
||||
}
|
||||
signal.Notify(ignore_sigint_channel, os.Interrupt)
|
||||
err = c.Wait()
|
||||
signal.Reset(os.Interrupt)
|
||||
if err != nil {
|
||||
fmt.Fprintln(os.Stderr, cmd[0], "failed with error:", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user