From 0d15e2772abf63b2fb8fd6cc5e7d0604926cd88e Mon Sep 17 00:00:00 2001 From: aler9 <46489434+aler9@users.noreply.github.com> Date: Sun, 3 Oct 2021 16:09:40 +0200 Subject: [PATCH] close custom commands with SIGINT again (#495) --- internal/core/rtsp_server_test.go | 2 +- internal/externalcmd/cmd_unix.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/core/rtsp_server_test.go b/internal/core/rtsp_server_test.go index de53b3de..9998e7c4 100644 --- a/internal/core/rtsp_server_test.go +++ b/internal/core/rtsp_server_test.go @@ -719,7 +719,7 @@ func TestRTSPServerFallback(t *testing.T) { func TestRTSPServerRunOnDemand(t *testing.T) { doneFile := filepath.Join(os.TempDir(), "ondemand_done") onDemandFile, err := writeTempFile([]byte(fmt.Sprintf(`#!/bin/sh -trap 'touch %s; [ -z "$(jobs -p)" ] || kill $(jobs -p)' QUIT +trap 'touch %s; [ -z "$(jobs -p)" ] || kill $(jobs -p)' INT ffmpeg -hide_banner -loglevel error -re `+ `-i ../../testimages/ffmpeg/emptyvideo.mkv -c copy -f rtsp rtsp://localhost:$RTSP_PORT/$RTSP_PATH & wait diff --git a/internal/externalcmd/cmd_unix.go b/internal/externalcmd/cmd_unix.go index db7d64f2..78f53278 100644 --- a/internal/externalcmd/cmd_unix.go +++ b/internal/externalcmd/cmd_unix.go @@ -32,7 +32,7 @@ func (e *Cmd) runInner() bool { select { case <-e.terminate: - syscall.Kill(cmd.Process.Pid, syscall.SIGQUIT) + syscall.Kill(cmd.Process.Pid, syscall.SIGINT) <-cmdDone return false