mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 14:18:26 +02:00
When reloading in all kitty instances, only use readlink on processes that contain "kitty" in the image name
Apparently there are some machines where a few hundred/thousand readlink calls take 30 seconds! See #7744
This commit is contained in:
@@ -364,8 +364,8 @@ func ReloadConfigInKitty(in_parent_only bool) error {
|
|||||||
}
|
}
|
||||||
if all, err := process.Processes(); err == nil {
|
if all, err := process.Processes(); err == nil {
|
||||||
for _, p := range all {
|
for _, p := range all {
|
||||||
if exe, eerr := p.Exe(); eerr == nil {
|
if c, err := p.CmdlineSlice(); err == nil && strings.Contains(c[0], "kitty") {
|
||||||
if c, err := p.CmdlineSlice(); err == nil && is_kitty_gui_cmdline(exe, c...) {
|
if exe, err := p.Exe(); err == nil && is_kitty_gui_cmdline(exe, c...) {
|
||||||
_ = p.SendSignal(unix.SIGUSR1)
|
_ = p.SendSignal(unix.SIGUSR1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user