[webkit-reviews] review granted: [Bug 237398] [macOS] WebContent processes crash with XPC_EXIT_REASON_SIGTERM_TIMEOUT when logging out : [Attachment 453770] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 3 12:01:15 PST 2022


Darin Adler <darin at apple.com> has granted Chris Dumez <cdumez at apple.com>'s
request for review:
Bug 237398: [macOS] WebContent processes crash with
XPC_EXIT_REASON_SIGTERM_TIMEOUT when logging out
https://bugs.webkit.org/show_bug.cgi?id=237398

Attachment 453770: Patch

https://bugs.webkit.org/attachment.cgi?id=453770&action=review




--- Comment #9 from Darin Adler <darin at apple.com> ---
Comment on attachment 453770
  --> https://bugs.webkit.org/attachment.cgi?id=453770
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=453770&action=review

>
Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.
mm:180
> +	   signal(SIGTERM, [](int) {
> +	       globalTransaction.get() = nullptr;
> +	       signal(SIGTERM, SIG_DFL);
> +	       raise(SIGTERM);
> +	   });

This looks great. Really glad Alexey pointed out it was not OK to call exit. I
tried to do some more research on "cleanup and re-raise signal" and see if it’s
more elegantly done with sigaction instead of signal, but the examples I found
are all like what you wrote here.


More information about the webkit-reviews mailing list