spec

Software for Diffraction

2.3.12. - Keyboard Interrupts



spec responds to two different asynchronous signals that can be sent from the keyboard to programs. These signals are interrupt and quit. A ^C is usually used to generate the interrupt signal, while a ^\ usually generates the quit signal. The control key assignments are, in principle, arbitrary and can be changed using the stty command from the UNIX shell. To display the current key assignments, type stty -a.

With spec, the interrupt key halts all activity, including asynchronous motor motion or counting, and closes all command files. All output files and devices (except log files) are closed. On keyboard interrupts (and command and syntax errors), cleanup macros, as described below may be run.


Typing the quit character will asynchronously terminate spec without saving the user's state. However, if motors are moving, the program will wait for them to halt and then update the settings file. If spec appears hung while waiting for hardware to finish some activity, type the interrupt or quit characters once or twice more, which should cause spec to give up on waiting and quit.