.
contact contact

Interprocess Communication using signals

 
.
  Eloquence may use the USR1 signal to communicate with either HP-UX processes or another Eloquence process.

ON SIGNAL
Branches to a specified program sequence when USR1 signal is caught

OFF SIGNAL
Cancels previous ON SIGNAL

SEND SIGNAL #
Send USR1 signal to specified taskid


The ON SIGNAL Statement

The ON SIGNAL statement sets up branching condition which will occur if a USR1 signal is caught.
            GOTO line id
ON SIGNAL   GOSUB line id
            CALL subprogram name
The branch occurs immediately after the current program line is executed.

Here is an example sequence which checks for the USR1 signal and branches to a routine to output some debug information.

100  ON SIGNAL GOSUB Signal
110  ON HALT GOTO Stop
120  LOOP
130   I=I+1
140  END LOOP
150 Stop:!
160  DISP "I=";I
170  END
180 Signal:!
190  DISP "I=";I
200  RETURN
The ON SIGNAL condition is cancelled after SCRATCH, STOP, END or RUN.

The OFF SIGNAL Statement

To cancel any previous OFF SIGNAL condition, use the OFF SIGNAL statement.
   OFF SIGNAL

The SEND SIGNAL # Statement

The SEND SIGNAL # statement will send a USR1 signal to the specified taskid.
   SEND SIGNAL #taskid
It's also possible to send USR1 signal from shell (or using the COMMAND statement) but this way you don't you have to know the process id of the destination process.

NOTE: HP-UX protection scheme prohibits sending signals to a process owned by another user.


 
 
.
 
 
  Privacy | Webmaster | Terms of use | Impressum Revision:  1998-09-24  
  Copyright © 1995-2002 Marxmeier Software AG