KILL
WTSupported in traditional Synergy on Windows
|
|
USupported on UNIX
|
VSupported on OpenVMS
|
xcall KILL
Discussion
The KILL routine terminates the current process. KILL works differently on each operating system.
- On Windows, the currently executing application is stopped as if a STOP statement were executed, except that destructors are not called.
- On UNIX, KILL terminates the calling process and any other processes in its process group with a HANGUP signal. The process group includes all processes spawned by the original process started from the command line. KILL is equivalent to executing a STOP statement except that destructors are not called. In the calling program, all other programs in the process group will be terminated at the point they are currently executing, with a signal trap.
- On OpenVMS, KILL terminates the calling process by making a call to the $DELPRC system service. KILL is equivalent to executing a STOP statement without destructors being called, followed by the LOGOUT command. If the calling Synergy program is running as a subprocess (created by RUNJB or VMCMD routines), that subprocess is terminated and control returns to the parent process.
See also
STOP statement
Examples
The example below can be called to kill the program after an invalid password is entered.
subroutine badpasswd .define TTCHN ,1 proc open(TTCHN, o, "tt:") writes(TTCHN, "Invalid password, logging off") xcall cleanup ;Prepare app. to stop xcall kill endsubroutine