bug处理

This commit is contained in:
truewhile
2026-09-07 23:45:59 +08:00
parent 5a47e6f52d
commit c489374b61
7 changed files with 138 additions and 30 deletions
+14
View File
@@ -0,0 +1,14 @@
//go:build unix
package service
import (
"os/exec"
"syscall"
)
// setFFmpegSysProcAttr puts ffmpeg in its own process group so cancel can
// tear down the whole group (and any helpers) reliably on Linux/macOS.
func setFFmpegSysProcAttr(cmd *exec.Cmd) {
cmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
}