Changeset 70672 in webkit


Ignore:
Timestamp:
Oct 27, 2010 10:51:26 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2010-10-27 Gabor Rapcsanyi <rgabor@inf.u-szeged.hu>

Reviewed by Tony Chang.

[NRWT] Fix http lock on Windows platform
https://bugs.webkit.org/show_bug.cgi?id=48321

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

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r70669 r70672  
     12010-10-27  Gabor Rapcsanyi  <rgabor@inf.u-szeged.hu>
     2
     3        Reviewed by Tony Chang.
     4
     5        [NRWT] Fix http lock on Windows platform
     6        https://bugs.webkit.org/show_bug.cgi?id=48321
     7
     8        * Scripts/webkitpy/layout_tests/port/http_lock.py:
     9
    1102010-10-27  Satish Sampath  <satish@chromium.org>
    211
  • trunk/WebKitTools/Scripts/webkitpy/layout_tests/port/http_lock.py

    r69585 r70672  
    7272
    7373    def _check_pid(self, current_pid):
    74         """Return True if pid is alive, otherwise return False."""
    75         try:
    76             os.kill(current_pid, 0)
    77         except OSError:
    78             return False
    79         else:
    80             return True
     74        """Return True if pid is alive, otherwise return False.
     75        FIXME: os.kill() doesn't work on Windows for checking if
     76        a pid is alive, so always return True"""
     77        if sys.platform in ('darwin', 'linux2'):
     78            try:
     79                os.kill(current_pid, 0)
     80            except OSError:
     81                return False
     82        return True
    8183
    8284    def _curent_lock_pid(self):
     
    9092            current_pid = current_lock_file.readline()
    9193            current_lock_file.close()
    92             if not (current_pid and
    93               sys.platform in ('darwin', 'linux2') and
    94               self._check_pid(int(current_pid))):
     94            if not (current_pid and self._check_pid(int(current_pid))):
    9595                os.unlink(lock_list[0])
    9696                return
     
    105105        while(True):
    106106            try:
    107                 sequential_guard_lock = os.open(self._guard_lock_file,
    108                                                 os.O_CREAT | os.O_NONBLOCK | os.O_EXCL)
    109 
     107                sequential_guard_lock = os.open(self._guard_lock_file, os.O_CREAT | os.O_EXCL)
    110108                self._process_lock_file_name = (self._lock_file_path_prefix +
    111109                                                str(self._next_lock_number()))
Note: See TracChangeset for help on using the changeset viewer.