improve synchronization between test harness runtests.pl script

and test harness servers to minimize risk of false test failures.

http://curl.haxx.se/mail/lib-2008-04/0392.html
This commit is contained in:
Yang Tse 2008-04-23 23:55:34 +00:00
parent 3783b455c0
commit 96edebf4d9
7 changed files with 132 additions and 7 deletions

View file

@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) 1998 - 2006, Daniel Stenberg, <daniel@haxx.se>, et al.
# Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@ -84,4 +84,25 @@ sub ftpkillslaves {
}
}
sub set_advisor_read_lock {
my ($filename) = @_;
if(open(FILEH, ">$filename")) {
close(FILEH);
return;
}
printf "Error creating lock file $filename error: $!";
}
sub clear_advisor_read_lock {
my ($filename) = @_;
if(-f $filename) {
unlink($filename);
}
}
1;