ChorusOS 4.0 Hot Restart Programmer's Guide

4.2.2 Group Restart

In the context of hot restart, an actor is considered to have abnormally terminated (and will therefore provoke the restart of its group) if any of the following occur:

There is no single API call which can explicitly force a group of actors to restart. For cases in which it may be desirable to provoke a restart (for example, for testing purposes), the easiest way to do so is to deliberately provoke one of the above cases. In the "hello world" example introduced in the previous chapter, this was done by causing a segmentation fault.

When an actor fails, all actors in the failed actor's restart group stop executing and the Hot Restart Controller restarts all direct actors in the group from their initial entry point. The direct actors are responsible for restarting any indirect actors, using hrfexec(). When hrfexec() is called with a name which is already registered in the Hot Restart Controller, the Controller recognizes the actor name and simply restarts the actor from the actor's actor image, instead of loading it from stable storage.

A restartable actor is always restarted at the same address. Its capacity, actor ID and user ID are not guaranteed to be the same after restart. All system resources obtained before the restart are lost: in particular, open files, including those that had been inherited at the time of initial creation are lost. This may include the standard I/O connected to an rsh connection.

A restarted actor uses the same arguments and environment parameters that were specified when the actor was initially started. For direct restartable actors, a new set of pre-open stdin/stdout/stderr is provided, which are connected to /dev/console. For indirect members, a new set of pre-open stdin/stdout/stderr is provided by the invoker of hrfexec(), just as for afexec(2K).