summaryrefslogtreecommitdiff
path: root/tests/server/util.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2009-11-26 10:15:08 +0000
committerYang Tse <yangsita@gmail.com>2009-11-26 10:15:08 +0000
commitcbd527843b4d0d04e33bb57d99c8e6139100db80 (patch)
tree5ac6f83ea3b59f6d280eb9d8024bafed5585745e /tests/server/util.c
parentfba233bb34d768f41e8ff35af54ba637f61eef2b (diff)
downloadcurl-cbd527843b4d0d04e33bb57d99c8e6139100db80.tar.gz
Only attempt to clear the server-logs lock when previously set by this same server.
Diffstat (limited to 'tests/server/util.c')
-rw-r--r--tests/server/util.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/server/util.c b/tests/server/util.c
index 646e52bcf..6c5022406 100644
--- a/tests/server/util.c
+++ b/tests/server/util.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2009, 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
@@ -260,6 +260,12 @@ void clear_advisor_read_lock(const char *filename)
int error = 0;
int res;
+ /*
+ ** Log all removal failures. Even those due to file not existing.
+ ** This allows to detect if unexpectedly the file has already been
+ ** removed by a process different than the one that should do this.
+ */
+
do {
res = unlink(filename);
} while(res && ((error = ERRNO) == EINTR));