pld-builder.new: bin/request-handler.sh - limit parallel runs to 1...

arekm arekm at pld-linux.org
Sun Mar 4 13:57:37 CET 2007


Author: arekm                        Date: Sun Mar  4 12:57:37 2007 GMT
Module: pld-builder.new               Tag: HEAD
---- Log message:
- limit parallel runs to 1 process

---- Files affected:
pld-builder.new/bin:
   request-handler.sh (1.3 -> 1.4) 

---- Diffs:

================================================================
Index: pld-builder.new/bin/request-handler.sh
diff -u pld-builder.new/bin/request-handler.sh:1.3 pld-builder.new/bin/request-handler.sh:1.4
--- pld-builder.new/bin/request-handler.sh:1.3	Fri Feb 13 11:12:37 2004
+++ pld-builder.new/bin/request-handler.sh	Sun Mar  4 13:57:32 2007
@@ -2,5 +2,12 @@
 
 umask 022
 export LC_CTYPE=en_US.iso-8859-1
-cd ~/pld-builder.new
-python PLD_Builder/request_handler.py
+
+if lockfile -r3 $HOME/.builder_request_handler.lock 2>/dev/null; then
+	trap "rm -f $HOME/.builder_request_handler.lock" 1 2 3 13 15
+	cd ~/pld-builder.new
+	python PLD_Builder/request_handler.py
+	rm -f $HOME/.builder_request_handler.lock
+else
+	return 1
+fi
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/pld-builder.new/bin/request-handler.sh?r1=1.3&r2=1.4&f=u



More information about the pld-cvs-commit mailing list