9.4 Signals to Control a PDP++ Process

When a PDP++ process is running in the background (see previous section for instructions on how to do this), it is no longer possible to gain control of it through either the script or graphical interface. However, the process will respond to a number of signals which allow one to save the state of the process to a file. The saved file can then be pulled up in the interface and the state of the simulation examined.

Signals can be sent to a process using the unix kill command, with two arguments: the signal type and the process id. There are two signal types that are "user defined", USR1 and USR2. We have defined USR1 to save any networks in the process to file(s) named `PDP++NetSave.#.net.gz', and USR2 to save any projects to file(s) named `PDP++Project.#.proj.gz'. The ALRM (alarm) signal will also save project files.

Any of the "lethal" signals like SEGV and BUS which cause the process to crash result in an attempt to save the current state of any open projects in PDP++Recover.#.proj.gz files. Thus, the user will not typically lose any work even when (or if) the software crashes. Note that the number # of the saved file will increment to be unique in the directory.

To kill a process without getting one of these recover files, use the strongest kill signal, KILL (signal number 9), which will bypass the saving of a recover file.