Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/servers/wptserve.py

Issue 2428223003: wptserve: Fix Python process leak on Windows. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Start and stop the WPTserve servers as they're used by the layout tests.""" 5 """Start and stop the WPTserve servers as they're used by the layout tests."""
6 6
7 from webkitpy.layout_tests.servers import server_base 7 from webkitpy.layout_tests.servers import server_base
8 8
9 9
10 class WPTServe(server_base.ServerBase): 10 class WPTServe(server_base.ServerBase):
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 self._keep_process_reference = True 53 self._keep_process_reference = True
54 self._start_cmd = start_cmd 54 self._start_cmd = start_cmd
55 55
56 def _stop_running_server(self): 56 def _stop_running_server(self):
57 # Clean up the pid file. 57 # Clean up the pid file.
58 if self._pid and not self._executive.check_running_pid(self._pid): 58 if self._pid and not self._executive.check_running_pid(self._pid):
59 self._filesystem.remove(self._pid_file) 59 self._filesystem.remove(self._pid_file)
60 return 60 return
61 61
62 # TODO(burnik): Figure out a cleaner way of stopping wptserve. 62 # TODO(burnik): Figure out a cleaner way of stopping wptserve.
63 self._executive.interrupt(self._pid) 63 if self._platform.is_win():
64 self._executive.kill_process(self._pid)
65 else:
66 self._executive.interrupt(self._pid)
64 67
65 # According to Popen.wait(), this can deadlock when using stdout=PIPE an d/or stderr=PIPE. 68 # According to Popen.wait(), this can deadlock when using stdout=PIPE an d/or stderr=PIPE.
66 # We're using DEVNULL for both so that should not occur. 69 # We're using DEVNULL for both so that should not occur.
67 self._process.wait() 70 self._process.wait()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698