Isolate ffmpeg process group
This commit is contained in:
parent
d124bfa24c
commit
49ef349d48
2 changed files with 5 additions and 1 deletions
|
|
@ -8,6 +8,7 @@ import (
|
|||
"os/exec"
|
||||
"path/filepath"
|
||||
"sync"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"lel/internal/aiprocess"
|
||||
|
|
@ -194,7 +195,7 @@ func (d *Daemon) stopAndProcess(reason string) {
|
|||
|
||||
d.log.Printf("stopping recording (%s)", reason)
|
||||
if cmd.Process != nil {
|
||||
_ = cmd.Process.Signal(os.Interrupt)
|
||||
_ = syscall.Kill(-cmd.Process.Pid, syscall.SIGINT)
|
||||
}
|
||||
_ = audio.WaitWithTimeout(cmd, 5*time.Second)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue