SIGNAL()

SIGNAL()

Top  Previous  Next

 

The SIGNAL() function raises a cross-process application signal.

 

 

Format

 

SIGNAL(user.no)

 

where

 

user.noevaluates to the QM number of the process to be signalled.

 

 

The SIGNAL() function provides a simple way to notify another QM process of a condition such as a request for a phantom to terminate. It returns True if the process identified by user.no is logged in.

 

 

 

Example

 

OK = SIGNAL(SERVER.USER)

 

This statement raises a cross-process application signal in the QM process with the user number in SERVER.USER.

 

The signalled process detects this signal using SYSTEM(1062) which will also clear it. For example, a phantom server process might have a main loop as below:

 

LOOP

  ...processing...

UNTIL SYSTEM(1062)

  SLEEP 5

REPEAT

 

 

See also:

SYSTEM()