Changeset 73769 in webkit


Ignore:
Timestamp:
Dec 10, 2010 12:23:21 PM (13 years ago)
Author:
tony@chromium.org
Message:

2010-12-10 Tony Chang <tony@chromium.org>

Reviewed by Eric Seidel.

Use FileSystem::remove when cleaning up http lock files
https://bugs.webkit.org/show_bug.cgi?id=50830

  • Scripts/webkitpy/layout_tests/port/http_lock.py:
Location:
trunk/WebKitTools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r73751 r73769  
     12010-12-10  Tony Chang  <tony@chromium.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Use FileSystem::remove when cleaning up http lock files
     6        https://bugs.webkit.org/show_bug.cgi?id=50830
     7
     8        * Scripts/webkitpy/layout_tests/port/http_lock.py:
     9
    1102010-12-10  Joone Hur  <joone@kldp.org>
    211
  • trunk/WebKitTools/Scripts/webkitpy/common/system/filesystem.py

    r73638 r73769  
    104104
    105105    def remove(self, path, osremove=os.remove):
    106         """On Windows, os.remove can sometimes fail.  We see this behavior in
    107         Chromium tests as well and are unsure why.  Others on the internet are
    108         equally confused:
    109         http://social.msdn.microsoft.com/Forums/en/windowssearch/thread/55582d9d-77ea-47d9-91ce-cff7ca7ef528
    110         http://codesearch.google.com/codesearch/p?hl=en#OAMlx_jo-ck/src/base/test/test_file_util_win.cc&q=diefiledie&exact_package=chromium&l=22
    111         """
     106        """On Windows, if a process was recently killed and it held on to a
     107        file, the OS will hold on to the file for a short while.  This makes
     108        attempts to delete the file fail.  To work around that, this method
     109        will retry for a few seconds until Windows is done with the file."""
    112110        try:
    113111            exceptions.WindowsError
  • trunk/WebKitTools/Scripts/webkitpy/layout_tests/port/http_lock.py

    r72194 r73769  
    3838from webkitpy.common.system.executive import Executive
    3939from webkitpy.common.system.file_lock import FileLock
     40from webkitpy.common.system.filesystem import FileSystem
    4041
    4142
     
    6263        if os.path.exists(self._process_lock_file_name):
    6364            _log.debug("Removing lock file: %s" % self._process_lock_file_name)
    64             os.unlink(self._process_lock_file_name)
     65            FileSystem().remove(self._process_lock_file_name)
    6566
    6667    def _extract_lock_number(self, lock_file_name):
     
    9495            if not (current_pid and self._executive.check_running_pid(int(current_pid))):
    9596                _log.debug("Removing stuck lock file: %s" % lock_list[0])
    96                 os.unlink(lock_list[0])
     97                FileSystem().remove(lock_list[0])
    9798                return
    9899        except (IOError, OSError):
Note: See TracChangeset for help on using the changeset viewer.