3 Task Initialisation

A task initialises AMS by calling ams_init() specifying the name by which the task is to be known to the message system. The name is registered and an exit handler set up. Sometimes it is not desirable to set up an exit handler – in that case ams_initeh() should be used.

A controlling task will need to know the name by which the subsidiary task is known to the message system. (For ADAM tasks this is done by having the user interface set environment variable ICL_TASK_NAME to the required name. This also serves to tell the task that it is indeed being run via the ADAM message system and not directly from the Unix shell.)