---
title: Status Codes
framework: Darwin Notify
role: collectionGroup
role_heading: API Collection
path: darwinnotify/status-codes
---

# Status Codes

## Discussion

Discussion These routines allow processes to exchange stateless notification events. Processes post notifications to a single system-wide notification server, which then distributes notifications to client processes that have registered to receive those notifications, including processes run by other users. Notifications are associated with names in a namespace shared by all clients of the system. Clients may post notifications for names, and may monitor names for posted notifications. Clients may request notification delivery by a number of different methods. Clients desiring to monitor names in the notification system must register with the system, providing a name and other information required for the desired notification delivery method. Clients are given an integer token representing the registration. Note that the kernel provides limited queues for mach message and file descriptor messages. It is important to make sure that clients read mach ports and file descriptors frequently to prevent messages from being lost due to resource limitations. Clients that use signal-based notification should be aware that signals are not delivered to a process while it is running in a signal handler. This may affect the delivery of signals in close succession. Notifications may be coalesced in some cases. Multiple events posted for a name in rapid succession may result in a single notification sent to clients registered for notification for that name. Clients checking for changes using the notify_check() routine cannot determine if more than one event pas been posted since a previous call to notify_check() for that name. “False positives” may occur in notify_check() when used with a token generated by notify_register_check() due to implementation constraints. This behavior may vary in future releases. Synchronization between two processes may be achieved using the notify_set_state() and notify_get_state() routines.

## Topics

### Constants

- [NOTIFY_STATUS_FAILED](darwinnotify/notify_status_failed.md)
- [NOTIFY_STATUS_INVALID_FILE](darwinnotify/notify_status_invalid_file.md)
- [NOTIFY_STATUS_INVALID_NAME](darwinnotify/notify_status_invalid_name.md)
- [NOTIFY_STATUS_INVALID_PORT](darwinnotify/notify_status_invalid_port.md)
- [NOTIFY_STATUS_INVALID_REQUEST](darwinnotify/notify_status_invalid_request.md)
- [NOTIFY_STATUS_INVALID_SIGNAL](darwinnotify/notify_status_invalid_signal.md)
- [NOTIFY_STATUS_INVALID_TOKEN](darwinnotify/notify_status_invalid_token.md)
- [NOTIFY_STATUS_NOT_AUTHORIZED](darwinnotify/notify_status_not_authorized.md)
- [NOTIFY_STATUS_OK](darwinnotify/notify_status_ok.md)

## See Also

### Constants

- [Miscellaneous Defines](darwinnotify/miscellaneous-defines.md)
