killpg()

kill process group 

Function


SYNOPSIS

#include <signal.h>

int killpg(int pgrp, int sig);


DESCRIPTION

killpg() sends the signal sig to the process group pgrp. See <signal.h> for a list of signals. If pgrp is 0, killpg() sends the signal to the sending process's process group.

The sending process and members of the process group must have the same effective used ID, or the sender must be the super user.


PARAMETERS

pgrp 

Is the process group to which the signal should be sent.

sig 

Is the signal to be sent.


RETURN VALUES

On success, a zero is returned. On error, -1 is returned, and errno is set to one of the following values:

EINVAL 

sig is not a valid signal number.

ESRCH 

No process can be found in the process group specified by pgrp. Or, the process group was given as 0 but the sending process does not have a process group.

EPERM 

The sending process is not the super user and one or more of the target processes has an effective user ID different from that of the sending process.


CONFORMANCE

UNIX 98, with exceptions.


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

Non-NuTCRACKER Platform processes do not have a process group unless they are created by a NuTCRACKER Platform process.

The determination of whether the sending process has permission to send a signal to the receiving process ignores any uid or gid settings that have been specified with calls to setuid() or setgid(). The determination is done by comparing the uids of each of the two processes at the time that they were created.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

api_intro

Functions:
getpgrp(), kill(), setpgrp(), signal()


PTC MKS Toolkit 10.4 Documentation Build 39.