Go to the first, previous, next, last section, table of contents.


Class Session

Class Session is the topmost part of the unix-modelled Muq job-control hierarchy.

Jobs are the elementary constituents of this hierarchy.

Jobs are grouped into jobsets, sets of jobs implementing logical tasks, such that all jobs in a jobset should normally be stopped or killed together.

Jobsets are in turn grouped into sessions, a session representing all tasks being run by a single user from a single net connection. Just as all the jobs in a jobset should be killed or suspended if the logical task is aborted, all the jobsets in a session should normally be suspended or killed if the network connection is broken.

A session is thus structurally almost identical to a jobset, except that it is hardwired to contain only jobsets, instead of only jobs. Sessions, like jobset, could be trivially replaced by generic objects if we were not trying to heavily protect the system against crashes due to programming errors or malicious tampering. Implementing a separate Session class allows the kernel to efficiently and simply do more sanity checking than would be the case with generic objects, and may also make the system more self-documenting.

Class Session adds the following properties to those of Class Plain:

$S.nextJobset:       Linklist holding all jobsets in session.
$S.previousJobset:   Linklist holding all jobsets in session.
$S.socket:            Network socket (or tty) for session, if any.
$S.sessionLeader:    Job recieving session-related signals.

Note: For convenience, the $S properties are also available in the public (default) propdir.


Go to the first, previous, next, last section, table of contents.