[llvm-commits] CVS: llvm-www/demo/index.cgi
Reid Spencer
reid at x10sys.com
Wed Aug 9 15:47:42 PDT 2006
Changes in directory llvm-www/demo:
index.cgi updated: 1.62 -> 1.63
---
Log message:
Make a timeout on the usage lock.
---
Diffs of the changes: (+10 -7)
index.cgi | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
Index: llvm-www/demo/index.cgi
diff -u llvm-www/demo/index.cgi:1.62 llvm-www/demo/index.cgi:1.63
--- llvm-www/demo/index.cgi:1.62 Wed Aug 9 17:33:19 2006
+++ llvm-www/demo/index.cgi Wed Aug 9 17:47:28 2006
@@ -5,7 +5,7 @@
# doing remote web JO99C compilations. (It could still be used for that
# purpose, though the two scripts have diverged somewhat.)
#
-# Last modified $Date: 2006/08/09 22:33:19 $
+# Last modified $Date: 2006/08/09 22:47:28 $
#
use strict;
@@ -140,12 +140,15 @@
print "<img align=right width=100 height=111 src=\"$LOGO_IMAGE_URL\" />";
}
-if ( -f "/tmp/webcompile/locked" ) {
-
-print "<p>Bitter Melon the cat says, 'this page is already in use by someone else at this ";
-print "time, try reloading in a second or two. Meow!'</p>\n";
-exit 0;
-
+if ( -f "/tmp/webcompile/locked" ) {
+ my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$locktime) =
+ stat("/tmp/webcompile/locked");
+ my $currtime = time();
+ if ($locktime + 60 > $currtime) {
+ print "<p>Bitter Melon the cat says, 'this page is already in use by someone else at this ";
+ print "time, try reloading in a second or two. Meow!'</p>\n";
+ exit 0;
+ }
}
system("touch /tmp/webcompile/locked");
More information about the llvm-commits
mailing list