About Chandra Archive Proposer Instruments & Calibration Newsletters Data Analysis HelpDesk Calibration Database NASA Archives & Centers Chandra Science Links

Skip the navigation links
Last modified: December 2006

URL: http://cxc.harvard.edu/ciao3.4/kill.tm.html
Hardcopy (PDF): A4 | Letter
AHELP for CIAO 3.4 kill Context: slangrtl

Synopsis

Send a signal to a process

Syntax

Integer_Type kill (Integer_Type pid, Integer_Type sig)

Description

This function may be used to send a signal given by the integer sig to the process specified by pid. The function returns zero upon success and -1 upon failure setting errno accordingly.

Example

The kill function may be used to determine whether or not a specific process exists:

    define process_exists (pid)
    {
       if (-1 == kill (pid, 0))
         return 0;     % Process does not exist
       return 1;
    }

This function is not supported by all systems.

Hardcopy (PDF): A4 | Letter
Last modified: December 2006



The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory.
60 Garden Street, Cambridge, MA 02138 USA.    Email: cxcweb@head.cfa.harvard.edu
Smithsonian Institution, Copyright © 1998-2004. All rights reserved.