When run from say, a Jamf Pro extension attribute on a server that no one logs into, instead of quitting gracefully, the application hangs with the error:
_RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.
and hangs... forever.
Found this out when recons wouldn't complete on my servers for a few months... 😊