From 132f3dc32dbf8a554129fa0096adeb0dd7bd944c Mon Sep 17 00:00:00 2001 From: david_williams <david_williams> Date: Sun, 8 Aug 2010 02:04:29 +0000 Subject: [PATCH] tweek Xvfb handling --- releng.control/cc.sh | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/releng.control/cc.sh b/releng.control/cc.sh index cd3026117..c5d4edc1c 100644 --- a/releng.control/cc.sh +++ b/releng.control/cc.sh @@ -13,7 +13,10 @@ fi XVFBSCREEN=${BUILD_HOME}/tmp mkdir -p ${XVFBSCREEN} -/usr/bin/Xvfb :$DISPLAYNUMBER -screen 0 1600x1200x24 -reset -fbdir ${XVFBSCREEN} & +/usr/bin/Xvfb :$DISPLAYNUMBER -screen 0 1600x1200x24 -ld 10240000 -ls 1024000 -lf 20 -reset -fbdir ${XVFBSCREEN} & +echo $! > ccxvfb.pid + + echo "ulimit: " `ulimit -n` @@ -61,4 +64,30 @@ echo " LOCAL_BUILD_PROPERTIES_DIR: ${LOCAL_BUILD_PROPERTIES_DIR}" echo echo " remember to check that X virtual frame buffer is running for display :$DISPLAYNUMBER for headless unit tests"; ps -ef | grep Xvfb -echo +echo; + + + +PIDFILE=cc.xvfbpid +echo; +if [ -f ${PIDFILE} ] ; then + echo " Killing Xvfb process from PID file" + PID=`cat ${PIDFILE}` + kill -3 $PID + # if permission denied, for example, then be sure not to remove PID file + if [ $? ] + then + if kill -9 $PID ; then + echo " Xvfb process stopped" + rm -f ${PIDFILE} + else + echo " Xvfb process could not be stopped" + fi + else + echo " Could not kill the process." + fi +else + echo " PID file (${PIDFILE}) does not exist." + echo " Either Xvfb not running, or PID file has been deleted" +fi +echo; -- GitLab