NAME
xpc
—
a structured, asynchronous interprocess
communication library
SYNOPSIS
#include
<xpc/xpc.h>
DESCRIPTION
The XPC framework facilitates interprocess communication using structured messages. Messages are structured using property list style objects such as dictionaries, arrays, strings, integers and UUIDs. Out-of-line types such as file descriptors and shared memory regions are also supported. The root object of each message is a dictionary.
Messages are sent via connections created using xpc_connection_create(3) and xpc_connection_create_mach_service(3).
XPC significantly leverages the on-demand process management features of launchd(8) to provide transparent process life-cycle management. As such, clients of the XPC framework have little to no responsibility for managing their corresponding service processes.
Consequently, there is no facility in XPC to directly query the execution status of a service. XPC services are simply made available when they are needed, so clients needn't be concerned with remote process state.
Dynamic service registrations (ala
bootstrap_register
(),
bootstrap_create_service
()
and
bootstrap_create_server
())
are also purposefully disallowed.
XPC's integration with launchd(8) also extends to being able to launch jobs on-demand with higher-level events than have been historically available. Using XPC and launchd together, jobs can be launched based on events in IOKit or the posting of BSD Notifications.
SEE ALSO
xpc_object(3), xpc_main(3), xpc_connection_create(3), xpc_connection_create_mach_service(3), xpc_dictionary_create(3), xpc_array_create(3), xpc_objects(3), xpc_events(3), xpc_abort(3), xpcproxy(8), notify(3), launchd(8)