
kill(+Pid, +Signal)

   Send the signal Signal to the process number Pid



Arguments
   Pid                 Integer
   Signal              Integer

Type
   Operating System

Description
   Send the signal number Signal to the process with process ID Pid.  This
   predicate is an interface to the UNIX system call kill(2).


   If Signal is 0, then only a check for existence of the process is
   performed.  In this case, kill/2 fails if the process does not exist.




Modes and Determinism
   kill(+, +) is semidet

Fail Conditions
   Fails if Signal is 0 and process Pid does not exist

Exceptions
     4 --- Pid or Signal are not instantiated.
     5 --- Pid or Signal are instantiated to non-integers.
   170 --- Pid or Signal has an invalid value.
   170 --- The process Pid belongs to another user.

Examples
   
Success:
      [eclipse]: get_flag(pid, Pid), kill(Pid, 31).
      Signal 31

      Pid = 2929
      yes.
      [eclipse]: kill(2929, 0)

      yes.
Failure:
      [eclipse]: kill(9999, 0)

      no.





See Also
   exec / 2, exec / 3, exec_group / 3, get_flag / 2, wait / 2
