Provide process manager session support
int procmgr_session( uint32_t nd,
The interpretation of the arguments depends on the event.
- A node descriptor.
This must currently be ND_LOCAL_NODE, or you'll get an
error of ENOREMOTE.
- A session ID or process ID, depending on the event.
- A file descriptor, process group, or signal, depending on the event.
- The event; one of:
For more information, see below.
Use the -l c option to
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 arguments that you provide need to match the event:
- Used by the
function to set the file descriptor, id, to be the controlling terminal
for the session headed by the session leader, sid.
- Used by the
setsid() function to create a new session
with the calling process becoming the session leader. Pass zero for
both sid and id arguments.
- Used by a character device resource manager to change the
process group upon the request of a client calling the
Set the sid argument to the client's current
session and the id argument to the new target process
group for the client.
- Used by a character device resource manager to drop a
signal of the type specified as the id argument (generally a
terminal/job control signal) on the appropriate member of the
session specified by the sid argument.