mirror of
https://github.com/curl/curl.git
synced 2026-08-25 10:53:37 +03:00
Only attempt to clear the server-logs lock when previously set by this same server.
This commit is contained in:
parent
fba233bb34
commit
cbd527843b
4 changed files with 69 additions and 13 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue