KILL

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

Module: USE IFPORT

Syntax

result = KILL (pid, signum)

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


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

Results

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

On Windows* systems, 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, Building Applications: Portability Library Overview

Example

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