CEEOKILL
C library interfaces: kill(), pthread_kill(),
raise(), sigqueue()
This CWI supports the C/C++ kill(), pthread_kill(), raise(),
and sigqueue() functions. The specific mapping is
as follows:
kill(pid, sig): CEEOKILL('1', pid, '0', Cond_Token, '0', fc)
pthread_kill(tid, sig): CEEOKILL('2', '0', tid, Cond_Token, '0', fc)
sigqueue(pid, sig_val): CEEOKILL('3', pid, '0', Cond_Token, 'sig_val', '0', fc)
raise(sig): CEEOKILL('1', getpid(), '0', Cond_Token, '0', fc)
The function value is set based on the severity code in the feedback token (fc).
Syntax
void CEEOKILL (function, process_id, thread_id, cond_rep, sig_val,
[q_data_token], [fc])
INT4 *function;
CEE_TOKEN *process_id;
CEE_THDID *thread_id;
FEED_BACK *cond_rep;
CEE_TOKEN *sig_val;
CEE_TOKEN *q_data_token;
FEED_BACK *fc;
- CEEOKILL
- Call this CWI interface as follows:
L R15,CEECAALEOV-CEECAA(,R12) CAA address is in R12 L R15,0028(,R15) BALR R14,R15
- function (input)
- Indicate the origin of this CWI request. It is 1 for kill(), 2 for pthread_kill() and 3 for sigqueue(). raise() is mapped to kill() to self (for example, function value = 1).
- process_id (input)
- Ignored unless the function value is 1. It indicates the process identifier to which the signal is to be sent. If that identifier is zero, the signal is sent to all processes (excluding an unspecified set of system processes) whose group identifier is equal to the process group identifier of the sender and for which the process has permission to send a signal. If the process identifier is negative (but not -1), the signal is sent to all of the processes (excluding an unspecified set of system processes) whose process group identifier is equal to the absolute value of this argument and for which the process has permission to send a signal.
- thread_id (input)
- Ignored unless the function value is 2. If the thread identifier is nonzero, the signal is sent to the identified thread. If the thread identifier is zero, the signal is sent to the process(es) based on the process identifier setting.
- cond_rep (input)
- The condition token defining the signal to be raised. The valid conditions are CEE5201 through CEE5222. CEE5223 and CEE5234 are supported in z/OS UNIX System Services. Additionally, CEE5200 represents the signal number value of zero and indicates the request for the validation the arguments but causes no signal to be sent. For a list of condition tokens that map to signals, see z/OS Language Environment Programming Guide.
- sig_val (input)
- Ignored unless the function value is 3. It indicates the value to be supplied with the signal when it is delivered to the process identified by the pid.
- q_data_token (input/optional)
- 32-bit data to be placed in the ISI for use in accessing the qualifying data that is associated with the given instance of the signal.
- fc (output/optional)
- A condition token that is returned by the service, indicating the degree of success of the service. The module that returns the code is in parentheses, but to the caller, it appears that CEEOKILL can return any of these.
Conditions
returned by the CEEOKILL service
Condition | Description type | Description value |
---|---|---|
CEE000 | Severity | 0 |
CEE000 | Msg_No | 0000 |
CEE000 | Message | The service completed successfully. |
CEE4S9 | Severity | 3 |
CEE4S9 | Msg_No | 5001 |
CEE4S9 | Message | The function failed due to POSIX(OFF) in effect (CEEOKILL). |
CEE55L | Severity | 3 |
CEE55L | Msg_No | 5301 |
CEE55L | Message | The value that is specified by cond_rep represents a condition that is not valid or a condition that is not a POSIX signal as defined for this product (CEEOKILL). |
CEE55M | Severity | 3 |
CEE55M | Msg_No | 5302 |
CEE55M | Message | The service was unsuccessful due to a z/OS Environmental or Internal error (CEEOSIGG). Consult the Reason_Code returned to determine the exact reason that the error occurred. The following reason code can accompany this error: JRPTCANCELERROR. |
Note that Return_Code and Reason_Code are returned as part of the qualifying data information of the fc, as shown in Figure 1.
Figure 1. Condition qualifying
data returned by CEEOKILL CWI