mirror of
https://github.com/u2takey/ffmpeg-go.git
synced 2025-10-04 07:36:28 +08:00
Move platform-specific code under build tags; fix corresponding tests
This commit is contained in:
@@ -140,3 +140,12 @@ func (s *Stream) RunLinux() error {
|
||||
|
||||
return cmd.Wait()
|
||||
}
|
||||
|
||||
// SeparateProcessGroup ensures that the command is run in a separate process
|
||||
// group. This is useful to enable handling of signals such as SIGINT without
|
||||
// propagating them to the ffmpeg process.
|
||||
func SeparateProcessGroup() CompilationOption {
|
||||
return func(s *Stream, cmd *exec.Cmd) {
|
||||
cmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true, Pgid: 0}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user