Files
MeBox/internal/service/transcoder_cmd_unix.go
truewhile c489374b61 bug处理
2026-09-07 23:45:59 +08:00

15 lines
315 B
Go

//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}
}