Signals are an asynchronous communication mechanism between jobs: by sending a signal to another job J, a job can kill or suspend J, or cause it to execute some J-selected bit of code. Typical uses are to stop runaway processes, to notify a job of some event in which it is interested or for which it it waiting, or to notify the job of some internal error event such as divide-by-zero or resource exhaustion.
Muq signals closely follow the unix model (specifically the POSIX.1 model with job control). Asynchronous communication is a treacherous programming area, it seemed best to stick close to known ground, both to smooth implementation and to reduce surprises for programmers moving between muq and unix.
Muq supports a fixed finite (currently 21) number of signals. Each job has, for each signal, a slot for a user-supplied signal handler function, and an integer mask specifying signals which should be blocked while that handler is running. These slots and masks are object properties accessable via normal keyval get and set operators in muf.
Signals are 'reliable': a bitmap is kept of pending interrupts, which will eventually be delivered if the process unblocks them (and does not terminate or such first).
Signals are not 'queued': if the same interrupt is given several times before the job has a chance to respond, the corresponding handler will be called only once, since muq's pending-interrupt bitmap is sufficient only to record that the interrupt has arrived at least once.
The names and meanings of Muq signals follow unix/posix as closely as practical.
Go to the first, previous, next, last section, table of contents.