[Previous] [Contents] [Next]

procmgr_session()

@@@Provide session support

Synopsis:

#include <sys/procmgr.h>

int procmgr_session( unint32_t nd,
                     pid_t sid,
                     int id,
                     unsigned event);

Library:

libc

Description:

The procmgr_session() function provides session to support to character device terminal drivers in their resource managers, C library functions and session management applications. (@@@ OK, this is mostly senseless. "Provides support" is too vague a function description.)

The arguments provided match the event:

PROCMGR_SESSION_TCSETSID
This is used by the tcsetsid@@@not doc'd-should be to refer to it(), function to set the file descriptor, id, to be the controlling terminal for the session headed by the session leader, sid.
PROCMGR_SESSION_SETSID
This is used by the setsid() function to create a new session with the calling process becoming the session leader. Zero is passed for both sid and id arguments.
PROCMGR_SESSION_SETPGRP
This is used by a character device resource manager to change the process group upon the request of a client calling the tcsetpgrp() function. The argument sid should be set to the client's current session and the id argument should be set to the new target process group for the client.
PROCMGR_SESSION_SIGNAL_PID, PROCMGR_SESSION_SIGNAL_PGRP, PROCMGR_SESSION_SIGNAL_LEADER
These are 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.

Returns:

0
Success.
-1 @@@not =/=0 ?@@@
Failure.

Classification:

@@@NONE

Safety:
Cancellation point No
Interrupt handler No
Signal handler No
Thread No

See also:


[Previous] [Contents] [Next]