Run calibre metadata server process in the background

This commit is contained in:
Kovid Goyal
2025-11-23 10:46:32 +05:30
parent 2184d3b7d0
commit 69a513d814

View File

@@ -19,6 +19,7 @@ import (
"github.com/kovidgoyal/kitty/tools/utils"
"github.com/kovidgoyal/kitty/tools/utils/humanize"
"github.com/kovidgoyal/kitty/tools/utils/images"
"golang.org/x/sys/unix"
)
var _ = fmt.Print
@@ -82,6 +83,7 @@ var calibre_server = sync.OnceValues(func() (ans *calibre_server_process, err er
ans.stdout.Close()
return nil, err
}
ans.proc.SysProcAttr = &unix.SysProcAttr{Setsid: true}
if err = ans.proc.Start(); err != nil {
err = fmt.Errorf("calibre-debug executable not found in PATH, you must install the calibre program to preview these file types: %w", err)
return