Standards
Standards / Extensions |
C or C++ |
Dependencies |
z/OS UNIX
|
both |
z/OS V1R6
POSIX(ON)
|
Format
#define _POSIX_SOURCE
#include <signal.h>
int __superkill(pid_t pid);
General description
The __superkill() function
generates a more robust version of the SIGKILL signal to the process
with pid as the process ID. The SIGKILL
will be able to break through almost all of the current signal deterrents
that can be an obstacle to the normal delivery of a SIGKILL and the
resulting termination of the target process.
Function restrictions
include:
- Cannot do a __superkill() to a group or specifying PID -1. An
attempt to do so will result in a EINVAL/JrNoGroups.
- The superkill will be ignored if the target process has blocked
all signals, in which case the __superkill() will not fail but simply
be ignored (refer to BPX1SDD syscall in topic. Callable services descriptions, z/OS UNIX System Services Programming: Assembler Callable Services Reference).
Under a multithread environment, as long as BPX1SDD is called on the
initial thread, __superkill() will be ignored. The sigprocmask() function
cannot be used to block __superkill().
- A regular SIGKILL must be sent, at least 3 seconds, to a process
before a superkill. Otherwise the attempt will result in EINVAL/JRSigkillNotSent.
- Runtime option POSIX(ON) is required to be set for this function
to work properly.
If the environment is valid, then the target process
will be abended with a '422'x abend reason code x'0109' reason code.
The abend code will be sent to the first dubbed thread in the process.
Under Language Environment®,
this is almost always the initial processing thread (IPT).
Returned value
When successful, the target
process is terminated. Upon failure, __superkill() returns -1 and
sets errno to one of the following values:
- Value
- Description
- ENIVAL
- PID is -1 or a group process ID or the superkill was not sent
3 seconds after the regular SIGKILL.
- EPERM
- The caller does not have the permission to send the signal to
any process that was specified by the process ID parameter.
- ESRCH
- No process or process groups that correspond to the process ID
are found.