1
0
Fork 0
mirror of https://github.com/albfan/miraclecast.git synced 2025-03-09 23:38:56 +00:00

Kill uibc viewer subprocess

closes #93
This commit is contained in:
albfan 2016-07-16 12:26:40 +02:00
parent 42820c00ba
commit 3f2266e254
2 changed files with 24 additions and 13 deletions

View file

@ -1,8 +1,19 @@
#!/bin/bash
function kill_child() {
CHILDREN="$(ps -o pid= --ppid $$)"
echo killing $CHILDREN
kill $CHILDREN
}
IP=$1
shift
UIBC_PORT=$1
shift
gstplayer $@ | miracle-uibcctl $IP $UIBC_PORT --daemon
echo $$
trap 'kill_child' SIGTERM
gstplayer $@ | miracle-uibcctl $IP $UIBC_PORT --daemon &
wait