No matter what I try to do to quit/kill my XPC service while its processing a message, my client only ever gets XPC_ERROR_CONNECTION_INTERRUPTED
and never XPC_ERROR_TERMINATION_IMMINENT
. To be specific, I tried all these things:
- Quitting the service while it's idle (
SIGTERM
) - Force-quitting the service while it's idle (
SIGKILL
) - Quitting the service while it's in the middle of processing a message (
SIGTERM
) - Force-quitting the service while it's in the middle of processing a message (
SIGKILL
) - Making the service quit itself in the middle of processing a message (
exit(EXIT_SUCCESS)
) - Making the service cancel the connection in the middle of processing a message (
xpc_connection_cancel(connection)
)
Hoping to find some examples of its usage, I searched around GitHub, and haven't really found anyone do much at all in response to this message. Some parts look like they come up from a common ancestor (probably some guide or template): https://github.com/search?q=%22The+client+process+on+the+other+end+of+the+connection+has+either%22&type=Code
Even Apple's own WebKit2 doesn't seem to do much with it: https://github.com/apple-opensource/WebKit2/search?q=XPC_ERROR_TERMINATION_IMMINENT
When does XPC_ERROR_TERMINATION_IMMINENT
ever come into play?