KILL

Portability Function: Sends a signal to the process given by ID.

Module: USE DFPORT

Syntax

result = KILL (pid, num)

pid
(Input) INTEGER(4). ID of a process to be signaled.


num
(Input) INTEGER(4). Signal value. For the definition of signal values, see the SIGNAL function.

Results:

The result is of type INTEGER(4). The result is zero if the call was successful; otherwise, an error code. Possible error codes are:

Arbitrary signals can be sent only to the calling process (where pid = getpid( )). Other processes can send only the SIGKILL signal (signum = 9), and only if the calling process has permission.

Compatibility

CONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS DLL LIB

See Also: RAISEQQ, SIGNALQQ, Portability Library

Example

USE DFPORT
integer(4) id_number, sig_val, istat
id_number=getpid( )
ISTAT = KILL (id_number, sig_val)