WebKit Bugzilla
Attachment 339199 Details for
Bug 185164
: webkitpy: SIGKILL right after SIGTERM causes orphaned processes with 'xcrun simctl spawn'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185164-20180501084953.patch (text/plain), 2.55 KB, created by
Jonathan Bedard
on 2018-05-01 08:49:54 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Jonathan Bedard
Created:
2018-05-01 08:49:54 PDT
Size:
2.55 KB
patch
obsolete
>Index: Tools/ChangeLog >=================================================================== >--- Tools/ChangeLog (revision 231195) >+++ Tools/ChangeLog (working copy) >@@ -1,3 +1,14 @@ >+2018-05-01 Jonathan Bedard <jbedard@apple.com> >+ >+ webkitpy: SIGKILL right after SIGTERM causes orphaned processes with 'xcrun simctl spawn' >+ https://bugs.webkit.org/show_bug.cgi?id=185164 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Scripts/webkitpy/common/system/executive.py: >+ (Executive.kill_process): First attempt will always send a SIGTERM, all subsequent attempts will >+ send a SIGKILL. A SIGKILL with not be sent if the process is not running to avoid orphaning childen. >+ > 2018-05-01 Oleksandr Skachkov <gskachkov@gmail.com> > > WebAssembly: add support for stream APIs - JavaScript API >Index: Tools/Scripts/webkitpy/common/system/executive.py >=================================================================== >--- Tools/Scripts/webkitpy/common/system/executive.py (revision 231160) >+++ Tools/Scripts/webkitpy/common/system/executive.py (working copy) >@@ -180,15 +180,12 @@ class Executive(AbstractExecutive): > # According to http://docs.python.org/library/os.html > # os.kill isn't available on Windows. python 2.5.5 os.kill appears > # to work in cygwin, however it occasionally raises EAGAIN. >- retries_left = 10 if sys.platform == "cygwin" else 1 >- while retries_left > 0: >+ retries_left = 10 if sys.platform == "cygwin" else 2 >+ current_signal = signal.SIGTERM >+ while retries_left > 0 and self.check_running_pid(pid): > try: > retries_left -= 1 >- # Give processes one change to clean up quickly before exiting. >- # Following up with a kill should have no effect if the process >- # already exited, and forcefully kill it if SIGTERM wasn't enough. >- os.kill(pid, signal.SIGTERM) >- os.kill(pid, signal.SIGKILL) >+ os.kill(pid, current_signal) > except OSError as e: > if e.errno == errno.EAGAIN: > if retries_left <= 0: >@@ -206,6 +203,9 @@ class Executive(AbstractExecutive): > return > raise > >+ # Give processes one chance to clean up quickly before exiting. >+ current_signal = signal.SIGKILL >+ > def _win32_check_running_pid(self, pid): > # importing ctypes at the top-level seems to cause weird crashes at > # exit under cygwin on apple's win port. Only win32 needs cygwin, so
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185164
:
339199
|
339203
|
339207