| Updated: October 28, 2024 |
Provide process manager session support
#include <sys/procmgr.h>
int procmgr_session( uint32_t nd,
pid_t sid,
int id,
unsigned event);
int procmgr_session_ext( uint32_t nd,
pid_t sid,
int xid,
int id,
unsigned event);
The interpretation of the arguments depends on the event.
For more information, see below.
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The procmgr_session() function provides session support to character device terminal drivers in their resource managers, C library functions, and session management applications. The procmgr_session_ext() function is an extended version that lets you pass extra information for the target session, as described above. Calling procmgr_session() is the same as calling procmgr_session_ext() with an xid of 0.
The arguments that you provide need to match the event; some of these events require certain abilities (see procmgr_ability()) be enabled:
Required ability: PROCMGR_AID_PGRP
Required ability: PROCMGR_AID_SESSION
Required ability: PROCMGR_AID_SESSION
If you call procmgr_session_ext() with an event of PROCMGR_SESSION_SIGNAL_PID, you can pass a thread ID for xid. If xid is greater than 0, and the thread with that ID is blocking the given signal, the function sets errno to EIO.
| Safety: | |
|---|---|
| Cancellation point | No |
| Interrupt handler | No |
| Signal handler | No |
| Thread | Yes |