Implement platform-specific process attribute settings for llama server

This commit is contained in:
2025-07-26 21:02:57 +02:00
parent e7f0626ce5
commit f8b6cabb6c
3 changed files with 25 additions and 4 deletions

15
pkg/process_group_unix.go Normal file
View File

@@ -0,0 +1,15 @@
//go:build !windows
package llamactl
import (
"os/exec"
"syscall"
)
func setProcAttrs(cmd *exec.Cmd) {
if cmd.SysProcAttr == nil {
cmd.SysProcAttr = &syscall.SysProcAttr{}
}
cmd.SysProcAttr.Setpgid = true
}