Update of /cvsroot/freevo/freevo In directory sc8-pr-cvs1:/tmp/cvs-serv31790
Modified Files: freevo Log Message: handle helper scripts killing by killing the script Index: freevo =================================================================== RCS file: /cvsroot/freevo/freevo/freevo,v retrieving revision 1.83 retrieving revision 1.84 diff -C2 -d -r1.83 -r1.84 *** freevo 14 Sep 2003 01:38:58 -0000 1.83 --- freevo 20 Sep 2003 08:47:47 -0000 1.84 *************** *** 12,15 **** --- 12,18 ---- # ----------------------------------------------------------------------- # $Log$ + # Revision 1.84 2003/09/20 08:47:47 dischi + # handle helper scripts killing by killing the script + # # Revision 1.83 2003/09/14 01:38:58 outlyer # More FreeBSD support from Lars *************** *** 171,174 **** --- 174,184 ---- fi + # help function to kill the current child from PID_FILE + # needed to work around signal problems when starting + # a helper + function kill_waiting_child() { + kill -KILL `cat $PID_FILE` > /dev/null 2>&1 + } + if [ -e "$script" ]; then PID_FILE="$PID_DIR/freevo-$name.pid" *************** *** 187,191 **** $RUNAPP python "$script" "$@" & echo $! > $PID_FILE ! wait `cat $PID_FILE` fi exit 0 --- 197,203 ---- $RUNAPP python "$script" "$@" & echo $! > $PID_FILE ! trap kill_waiting_child SIGTERM ! trap kill_waiting_child SIGINT ! wait `cat $PID_FILE` >/dev/null 2>/dev/null </dev/null fi exit 0 *************** *** 287,291 **** #echo PID is $! echo $! > $PID_FILE ! wait `cat $PID_FILE` rm $PID_FILE > /dev/null 2>&1 exit 0 --- 299,303 ---- #echo PID is $! echo $! > $PID_FILE ! wait `cat $PID_FILE` >/dev/null 2>/dev/null rm $PID_FILE > /dev/null 2>&1 exit 0 ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Freevo-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-cvslog