kill

kill --  sends a signal to a process.

Syntax

kill (pid, signo)

		

Arguments

pid

The process id number.

signo

The signal number, normally one of the built-in signal values.

Returns

t

Description

This process functions similarly to the kill shell command. Signals and their descriptions can be found in signal.

Example

Process 1:

    Gamma> getpid();
    8299
    Gamma> 
    		

Process 2:

    Gamma> kill(8299,9);
    t
    Gamma> 
    		

Process 1:

    Gamma> Killed
    		

Process 3:

    Gamma> getpid();
    9041
    Gamma> kill (9041,14);
    Alarm clock

See the Starting Programs section of the Common Functions chapter (Tutorial One), or the Kill a Child Process section or the Stop Processes section of the Common Functions for Any Program chapter (Tutorial Two) in the Cogent Tools Demo and Tutorials book for examples of this function used in context.

See Also

signal

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.