1 :Info: process_overseer.gi: process_overseer:
  2 1984-02-08  Process Overseer
  3 
  4 The process overseer is the last program called by the system when a
  5 user's process starts up.  It has the responsibility of setting up
  6 special features of the enviroment, if any, and finding and executing
  7 a start_up exec_com.
  8 
  9 There are two currently installed process overseers, process_overseer_
 10 and project_start_up_.  The default is process_overseer_.
 11 
 12 
 13 The process_overseer_ sets up a handler for the mme2 condition so that
 14 debug breakpoints will result in debug being entered.  It then calls
 15 command_query_ to allow the ".." escape by default in the process.  It
 16 looks for a start_up.ec and, if it finds one, uses "exec_com
 17 Start_upPath" as the initial command line, and calls the listener.
 18 
 19 
 20 The project_start_up_ executes a project start_up in addition to the
 21 user's start_up.  It establishes a condition handler that logs the
 22 user out if any error happens during the exec_com, and sets the
 23 working directory to the project directory.  It restores the working
 24 directory after the project start up is finished, and then goes on
 25 identically to process_overseer_.
 26 
 27 If the project start_up (>udd>Project_id>project_start_up.ec) is not
 28 found, the user's process is terminated.
 29 
 30 
 31 Normally the process overseer is called by a support procedure called
 32 an "init_admin" that sets up a conventional Multics user enviroment.
 33 There are three init_admins: user_init_admin_, absentee_init_admin_,
 34 and daemon_init_admin_ for interactive, absentee, and daemon processes
 35 respectively.  A process overseer can also be called directly as the
 36 first procedure in the user ring, in which case it is responsible for
 37 setting up the entire user enviroment.  Such a procedure is called a
 38 ",direct" process overseer.
 39 
 40 
 41 Project administrators of delegated projects can specify the process
 42 overseer for their users in the PMF.  System administrators are
 43 responsible for undelegated projects.  Users with the v_init_proc
 44 attribute can specify their process overseer for a particular process
 45 with the -po option to the login command.  They can provide an
 46 alternate version for all of their processes by putting it in their
 47 home directory, however it must have the same name as the overseer
 48 specified in the PMF.  See the section entitled "Providing a private
 49 process overseer" for more details.
 50 
 51 
 52 Specifying process overseers in the PMF: A process overseer is
 53 specified in the PMF with the initproc keyword.  The standard PMF of a
 54 newly delegated project contains the statement:
 55 
 56    Initproc:  process_overseer_;
 57 
 58 This causes the users in the project to get process_overseer_ for
 59 their process overseer unless there is an initproc keyword in their
 60 entry.  Thus to make project_start_up_ the default, change
 61 "process_overseer_" to "project_start_up_" in the Initproc keyword.
 62 
 63 
 64 To give a particular user a different process overseer than the one
 65 specified by the Initproc keyword, set up that user's entry to look
 66 like this:
 67 
 68    personid: JEHoover;
 69              initproc: some_special_overseer_;
 70              {any other keywords}
 71 
 72 
 73 To specify that a process overseer is a direct overseer, append the
 74 string ",direct" to the end of the name.  For example:
 75 
 76    Initproc: weird_enviroment_,direct;
 77 
 78 
 79 Supplying a private process overseer: There are three ways to get an
 80 unusual process overseer.  First, the -po option can be supplied to
 81 the login command.  This is recommended for debugging.  For example:
 82 
 83    l Athos Musketeer -po >udd>M>Athos>new_po>richelieu_overseer_
 84 
 85 The overseer is found by the normal search rules, so that the pathname
 86 may be specified as a path relative to the homedir.  For example, the
 87 example above could have been typed as:
 88 
 89    l Athos Musketeer -po new_po>richelieu_overseer_
 90 
 91 To get a ,direct overseer, add ",direct" to the pathname. Example:
 92 
 93    l Richelieu Cardinal -po intrigue>espionage_overseer_,direct
 94 
 95 
 96 The second technique is to put the overseer in the home directory.  It
 97 must have the same name as the one specified in the PMF.  If you are
 98 coding your own process overseer, you can add extra names to the
 99 entrypoint and the to the segment itself, or you can just give it the
100 same name.  To use an existing overseer without changing it, create a
101 transfer vector.  In pl1 it might look like:
102 
103    process_overseer_: project_start_up_: proc (pit_ptr);
104 
105    dcl pit_ptr ptr;
106    dcl different_overseer_ ext entry (ptr);
107 
108    call different_overseer_ (pit_ptr);
109    return;
110    end;
111 
112 
113 This would substutite different_overseer_ for either process_overseer_
114 or project_start_up_.  Of course, the names on the entrypoint will
115 depend on what you want to replace.  A transfer vector for a ,direct
116 overseer would be similiar but would lack the argument.
117 
118 
119 Writing a process overseer: The easiest way to write a special process
120 overseer is to copy one of the installed ones and modify it to taste.
121 To get a copy of process_overseer_.pl1 in your working directory,
122 execute the following command:
123 
124    library_fetch process_overseer_.pl1
125 
126 
127 For ,direct overseers the init_admin_'s are the logical models,
128 however the real work of these programs is done by a parallel set of
129 programs that they call: the real_init_admin's.  Thus to see how the
130 default interactive enviroment is set up, type:
131 
132    library_fetch (user_init_admin_.alm user_real_init_admin_.pl1)
133 
134 
135 Start_up exec coms: Most process overseers that put the user in
136 something like the normal enviroment execute a start_up exec com.  In
137 general, this exec_com is found by searching in three places: the
138 homedir, >udd>Project_id, and >sc1 (in that order) for a segment named
139 start_up.ec.
140 
141 
142 :hcom:
143 
144 /****^  HISTORY COMMENTS:
145   1) change(2021-02-20,GDixon), approve(2021-02-20,MCR10088),
146      audit(2021-05-27,Swenson), install(2021-05-27,MR12.6g-0056):
147       A) Prior info seg name was a mis-nomer: process_overseer_.info
148          Makes it appear to document a subroutine, whereas content describes
149          the general uses of process overseer programs.
150       B) Rename to process_overseer.gi.info, with added name of
151          process_overseer.info.
152       C) Header date changed to iso_date format.
153                                                    END HISTORY COMMENTS */