]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
toaster: fix file name collision
authorBelen Barros Pena <belen.barros.pena@linux.intel.com>
Tue, 18 Nov 2014 15:02:17 +0000 (15:02 +0000)
committerAlexandru DAMIAN <alexandru.damian@intel.com>
Thu, 20 Nov 2014 15:43:56 +0000 (15:43 +0000)
When toaster is used by multiple users on the same machine,
it is possible that files in /tmp have a name race.

This patch makes sure that the files have unique names.

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
bin/toaster

index 4c6ac5ac4085822ba4efac616c7ee72721f12d63..75f31d032e56ae18adfc0a808692aa5b23235c88 100755 (executable)
@@ -69,7 +69,7 @@ function webserverStartAll()
        fi
         if [ $retval -eq 0 ]; then
            echo "Starting webserver"
-            python $BBBASEDIR/lib/toaster/manage.py runserver "0.0.0.0:$WEB_PORT" </dev/null >${BUILDDIR}/toaster_web.log 2>&1 & echo $! >${BUILDDIR}/.toastermain.pid
+            python $BBBASEDIR/lib/toaster/manage.py runserver "0.0.0.0:$WEB_PORT" </dev/null >${BUILDDIR}/toaster_web_$$.log 2>&1 & echo $! >${BUILDDIR}/.toastermain.pid
             sleep 1
             if ! cat "${BUILDDIR}/.toastermain.pid" | xargs -I{} kill -0 {} ; then
                 retval=1