## Setting Up Timesharing System Procedure Files

OS-9 systems used for timesharing usually have a procedure file that brings the system up by means of one simple command or by using the system `startup` file. A procedure file which initiates the timesharing monitor for each terminal is executed to start up the system. The procedure file first starts the system clock, then initiates concurrent execution of a number of processes that have their I/O redirected to each timesharing terminal.

Usually one tsmon command program is started up concurrently for each terminal in the system. This is a special program which monitors a terminal for activity. When a carriage return character is typed on any of these terminals, the tsmon command initiates the login command program. If a user does not enter a correct password or user number in three tries, the login command will be aborted. Here's a sample procedure file for a 4-terminal timesharing system having terminals names “TERM”, “T1”, “T2”, and “T3”.

    * system startup procedure file
    echo Please Enter the Date and Time
    setime </term
    printerr
    tsmon /t1&
    tsmon /t2&
    tsmon /t3&

NOTE: This login procedure will not work until a password file called `/D0/SYS/PASSWORD` has been created. For more information, please see the login command description.

The example above deserves special attention. Note that the setime command has its input redirected to the system console “term”, which is necessary because it would otherwise attempt to read the time information from its current standard input path, which is the procedure file and not the keyboard.