Thanks for being a part of WWDC25!

How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here

How to prevent the background XPC process from being forced to shut down in MacOS? (kill - 9)

I don't want the XPC process to be killed and restarted

Answered by DTS Engineer in 700734022

I don't want the XPC process to be killed and restarted

This goal is not achievable on macOS. There’s simply no way to create unkillable process.

Can you explain the background to your question? There may be an alternative approach you can take, but it’s hard to offer suggestions without that background.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Accepted Answer

I don't want the XPC process to be killed and restarted

This goal is not achievable on macOS. There’s simply no way to create unkillable process.

Can you explain the background to your question? There may be an alternative approach you can take, but it’s hard to offer suggestions without that background.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

After the XPC process with personal VPN function is forced to exit

I’m confused. The term Personal VPN usually refers to the technique of using NEVPNManager to configure VPN for the user utilising one of the built-in VPN transports (IKEv2 or IPsec). In that case the XPC services involved are owned by the system and you shouldn’t be interacting with them at all.

Are you using some other definition of “personal VPN”? If so, please elaborate.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

How to prevent the background XPC process from being forced to shut down in MacOS? (kill - 9)
 
 
Q