close custom commands with SIGINT again (#495)

This commit is contained in:
aler9 2021-10-03 16:09:40 +02:00
parent 131148ecb4
commit 0d15e2772a
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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