mirror of
https://github.com/bluenviron/mediamtx
synced 2025-02-09 07:58:04 +00:00
close custom commands with SIGINT again (#495)
This commit is contained in:
parent
131148ecb4
commit
0d15e2772a
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user