procmgr_event_trigger(), procmgr_event_trigger_updateable()
Trigger a system-wide event
Synopsis:
#include <sys/procmgr.h>
int procmgr_event_trigger( const unsigned flags );
int procmgr_event_trigger_updateable( const unsigned flags,
const int value );
Arguments:
- flags
- A bitwise OR of the types of event that you want to trigger:
- PROCMGR_EVENT_CONFSTR (privileged)
- PROCMGR_EVENT_CONTIG_ALLOC_FAIL (privileged)
- PROCMGR_EVENT_DAEMON_DEATH (privileged)
- PROCMGR_EVENT_PATHSPACE
- PROCMGR_EVENT_PROCESS_CREATE(privileged)
- PROCMGR_EVENT_PROCESS_DEATH (privileged)
- PROCMGR_EVENT_SYNC
- PROCMGR_EVENT_SYSCONF (privileged)
- PROCMGR_EVENT_TOD
For descriptions of the events, see
Event types
in the entry for procmgr_event_notify_add().Note:In order to trigger a privileged event, your process must have the PROCMGR_AID_EVENT ability enabled. For more information, see procmgr_ability(). - value
- (procmgr_event_trigger_updateable() only) The value that you want to assign to sigev_value in the notification event (see below).
Library:
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
Description:
The procmgr_event_trigger() and procmgr_event_trigger_updateable() functions trigger a system-wide event. The event is sent to all processes that requested (via procmgr_event_notify_add() or procmgr_event_notify()) to be notified of the event identified by flags. Each registered process provides a sigevent structure that specifies how it should be notified of the event.
The procmgr_event_trigger_updateable() function
lets you specify sigev_value for the processes that set
SIGEV_FLAG_UPDATEABLE when they registered for notification.
For more information about setting this flag, see
Hidden bits
in the entry for sigevent;
for details about the extra information, see
procmgr_event_notify_add().
Returns:
-1 on error (errno is set); any other value indicates success.
Errors:
- EPERM
- The calling process doesn't have the required permission; see procmgr_ability().
Examples:
#include <sys/procmgr.h>
int main ( void )
{
procmgr_event_trigger( PROCMGR_EVENT_SYNC );
}
Classification:
Safety: | |
---|---|
Cancellation point | No |
Signal handler | Yes |
Thread | Yes |