mirror of
https://github.com/truewhile/MeBox.git
synced 2026-09-28 03:06:38 +08:00
15 lines
315 B
Go
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}
|
|
}
|