z/OS Using REXX and z/OS UNIX System Services
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


kill

z/OS Using REXX and z/OS UNIX System Services
SA23-2283-00

Read syntax diagramSkip visual syntax diagram
>>-kill--pid--signal--+--------+-------------------------------><
                      '-option-'   

Function

kill invokes the kill callable service to send a signal to a process or process group.

Parameters

pid
A number, the process ID of the process or process group to which the caller wants to send a signal.
signal
The signal to be sent. You can set the value by using a numeric value (see REXX predefined variables or the predefined variable beginning with SIG used to derive the numeric value:
Variable Description
SIGABND Abend
SIGABRT Abnormal termination
SIGALRM Timeout
SIGBUS Bus error
SIGCHLD Child process terminated or stopped
SIGCONT Continue if stopped
SIGFPE Erroneous arithmetic operation, such as division by zero or an operation resulting in an overflow
SIGHUP Hangup detected on the controlling terminal
SIGILL Termination that cannot be caught or ignored
SIGINT Interactive attention
SIGIO Completion of input or output
SIGIOERR Error on input/output; used by the C runtime library
SIGKILL Termination that cannot be caught or ignored
SIGPIPE Write on a pipe with no readers
SIGPOLL Pollable event
SIGPROF Profiling timer expired
SIGQUIT Interactive termination
SIGSEGV Detection of an incorrect memory reference
SIGSTOP Stop that cannot be caught or ignored
SIGSYS Bad system call
SIGTERM Termination
SIGTRAP Trap used by the ptrace callable service
SIGTSTP Interactive stop
SIGTTIN Read from a controlling terminal attempted by a member of a background process group
SIGTTOU Write from a controlling terminal attempted by a member of a background process group
SIGURG High bandwidth data is available at a socket
SIGUSR1 Reserved as application-defined signal 1
SIGUSR2 Reserved as application-defined signal 2
SIGVTALRM Virtual timer expired
SIGXCPU CPU time limit exceeded
SIGXFSZ File size limit exceeded
option
The name of a variable that contains exactly four bytes mapped by the BPXYPPSD macro.

Usage notes

  1. A caller can send a signal if the real or effective user ID of the caller is the same as the real or saved set user ID of the intended recipient. A caller can also send signals if it has appropriate privileges.
  2. Regardless of user ID, a caller can always send a SIGCONT signal to a process that is a member of the same session as the sender.
  3. A caller can also send a signal to itself. If the signal is not blocked, at least one pending unblocked signal is delivered to the sender before the service returns control. Provided that no other unblocked signals are pending, the signal delivered is the signal sent.

See Using the REXX signal services for information on using signal services.

Example

In the following example, assume that pid was assigned a value earlier in the exec:
"kill" pid sighup

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014