We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9767b6 commit 7275617Copy full SHA for 7275617
native.go
@@ -11,6 +11,7 @@ import (
11
"os"
12
"os/exec"
13
"sync"
14
+ "syscall"
15
"time"
16
17
"github.com/pion/webrtc/v4/pkg/media"
@@ -224,6 +225,12 @@ func ExtractAndRunNativeBin() error {
224
225
cmd.Stdout = os.Stdout
226
cmd.Stderr = os.Stderr
227
228
+ // Set the process group ID so we can kill the process and its children when this process exits
229
+ cmd.SysProcAttr = &syscall.SysProcAttr{
230
+ Setpgid: true,
231
+ Pdeathsig: syscall.SIGKILL,
232
+ }
233
+
234
// Start the command
235
if err := cmd.Start(); err != nil {
236
return fmt.Errorf("failed to start binary: %w", err)
0 commit comments