Since Muq, like unix, allows jobs to cooperate easily to accomplish a task, and since it is likely that Muq shells, like unix shells, will take advantage of this to implement complex tasks as a set of jobs, there arises the problem of coordinating and controlling these complexes: what if the user fires up a pipeline of half a dozen jobs and then wants to abort them halfway through? Doing so shouldn't be a mysterious task requiring sorting through listings and killing them off one at a time by number.
Since this problem is rife with tricky complications, since unix solves it reasonably well, since I see no reason to believe that I can match, much less improve upon, the unix solution, and since following the unix lead allows users to transfer hard-won expertise back and forth between Muq and unix, Muq attempts to follow the unix model fairly closely in this area.
JobSets correspond directly to unix process groups, and exist to group a set of jobs implementing one conceptual task together into a cluster which may be conveniently stopped, restarted, and killed as a unit.
A jobSet is essentially nothing more than an object with a propdir full of jobs, but is made a separate class to help let the server keep a handle on the sanity of the system: we don't want users doing bogus things to jobsets and confusing the server multitasking machinery.
Class JobSet adds the following properties to those of Class Plain:
$S.jobsetLeader: Job serving as equivalent of unix "process group leader". $S.jobQueue: Jobqueue holding all jobs in jobset. $S.nextJobset: Linklist holding all jobsets in session. $S.previousJobset: Linklist holding all jobsets in session. $S.session: Session to which this jobset belongs.
Other jobs in the jobset are filed under pid. (?)
Note: For convenience, the $S properties are also available in the public (default) propdir.
Note: JobSet functionality is incomplete in release -1.0.0.
Go to the first, previous, next, last section, table of contents.