From 92fc8204348d60ab44e74bc530094844db50e6a0 Mon Sep 17 00:00:00 2001 From: Refik Hadzialic Date: Fri, 2 Sep 2011 14:00:17 +0200 Subject: Added a Mutex for the execution of our testing software, so two processes can't run parallely! --- notFinishedCode/web/mutex1.php | 61 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 notFinishedCode/web/mutex1.php diff --git a/notFinishedCode/web/mutex1.php b/notFinishedCode/web/mutex1.php new file mode 100644 index 0000000..488a9fa --- /dev/null +++ b/notFinishedCode/web/mutex1.php @@ -0,0 +1,61 @@ +"; + sleep(10); + $release = ReleaseLock(); + echo $release . "
"; +} +elseif ($locking == '0') +{ + echo 'Somebody is using the web site already!' . "
"; +} +else +{ + echo 'We have some serious error here'; +} +?> -- cgit v1.2.3-55-g7522