The %kill() function sends the signal specified in signal to the process pid.
For Windows: Not Supported
var = %kill(pid, signal)
All D3 processes normally catch signals for their internal use. The built-in %pgetpid allows finding the PID of a process by knowing its port number (PIB). Only SIGUSR2 should be sent to a D3 process. Other signals are used internally and can cause problems if used out of context.
SIGTERM | Logs off the D3 process and disconnects it. |
SIGHUP | Logs off the D3 process, but leaves it connected to the D3 virtual machine. This behavior can be modified by providing a user written signal handler. |
SIGINT | Emulates pressing the BREAK key, possibly sending the D3 process to the debugger. |
Signal numbers are defined in dm,bp,unix.h signal.h.
* Get its pid, and send hangup (SIGHUP=1) to it. pib=32 pid=%pgetpid(pib) if %kill(pid, 1) = -1 then print "Cannot logoff process ":pib end