Use this command to end a process or send a signal.
Requirements and Restrictions
- The parameters for this command are case-sensitive. You
must enter the parameters exactly as shown in the syntax
diagram.
- You can enter this command only in CRAS state or higher.
- Because of the unique processing environment in the TPF system, only
programs that are capable of receiving signals will be affected by this
command.
Format
- -l
- writes the names of all supported signals and their corresponding signal
number to the standard output (stdout) stream.
- -s
- sends a signal to the specified process identifier (ID).
- signal
- is the signal that you want to send. You can specify this value as
one of the following integer values or the corresponding symbolic signal
name:
- Integer Value
- Symbolic Signal Name
- 1
- SIGHUP
- 2
- SIGINT
- 3
- SIGABRT
- 4
- SIGILL
- 8
- SIGFPE
- 9
- SIGKILL
- 11
- SIGSEGV
- 13
- SIGPIPE
- 14
- SIGALRM
- 15
- SIGTERM
- 16
- SIGUSR1
- 17
- SIGUSR2
- 18
- SIGABND
- 20
- SIGCHLD
- 27
- SIGIOER
- pidnum
- is the process ID created by the TPF system at the start of a
process. If you do not specify the -s parameter, the SIGTERM signal is
sent to end this process.
Use the getpid function in your application program to determine
the process ID. The application program can be used to write the
process ID to a file or to the console.
Additional Information
- Online help information is available for this command. To display
the help information, enter one of the following:
ZFILE HELP kill
ZFILE HELP
ZFILE ?
In addition, the correct command syntax is displayed if you enter the syntax
incorrectly.
- This command does not read from the standard input (stdin)
stream.
You can redirect the standard output (stdout) stream from the
display terminal to a file by specifying one of the redirection characters
(> or >>) followed by the file name to which you want
the output written. The > character writes the output to a
file. The >> character appends the output to an existing
file.
You can redirect the standard error (stderr) stream from the
display terminal to a file by specifying one of the redirection characters
(2> or 2>>) followed by the file name to which you want
the error output written. The 2> character writes the error
output to a file. The 2>> character appends the error output
to an existing file.
- Note:
- When you use the > or 2> character, if the file that
you are redirecting data to already exists, the file is overwritten and any
data in that file is lost. If you do not want to overwrite the file,
ensure that you use the >> or 2>> character.
- The ZFILE kill command is based on a subset of the kill utility of the
Portable Operating System Interface for Computer Environments (POSIX)
standards.
- This command supports the following three quoting mechanisms, which allow
you to override the special meaning of some characters:
- escape character (\)
- preserves the literal value of the character that follows. To
ignore the special meaning of a character, escape it by placing a backslash
(\) in front of it. In the example that follows, environment
variable PATH is /bin:/usr/bin:., the first
dollar sign ($) is escaped because of the preceding backslash, and the
second dollar sign takes on a special meaning.
User: ZFILE echo \$PATH is $PATH
System: $PATH is /bin:/usr/bin:.
- single quotation marks (' ')
- preserves the literal value of all characters between the opening single
quotation mark and the closing single quotation mark. For example,
entering ZFILE echo '*' displays an asterisk
character (*). Without the single quotation marks, the files
in the current working directory are displayed.
- double quotation marks (" ")
- preserves the literal value of all characters between the opening double
quotation mark and the closing double quotation mark except the dollar sign
($), the backquote (`), and the backslash (\).
This allows you to use the escape character inside double quotation marks,
which you cannot do in single quotation marks.
For example, entering ZFILE echo "\$PATH is \"$PATH\""
displays $PATH is "/bin:/usr/bin:."
If you want to use the literal meaning of any of the following
characters, you must always use a quoting mechanism:
left angle bracket (<)
| right angle bracket (>)
| ampersand (&)
|
backquote (`)
| backslash (\)
| dollar sign ($)
|
double quotation mark (")
| new-line (\n)
| left parenthesis ( ( )
|
right parenthesis ( ) )
| semicolon (;)
| single quotation mark (')
|
blank space
| tab
| vertical bar (|)
|
In addition, use a quoting mechanism when any of the following characters are
used in a way that takes on a special meaning but you want to use the literal
meaning:
asterisk (*)
| equal sign (=)
| left square bracket ( [ )
|
number sign (#)
| question mark (?)
| tilde (~)
|
Examples
In the following example, a list of supported symbolic signal names is
displayed.
+--------------------------------------------------------------------------------+
|User: ZFILE kill -l |
| |
|System: FILE0001I 23.28.38 START OF DISPLAY FROM kill -l |
| 1) SIGHUP 2) SIGINT 3) SIGABRT 4) SIGILL |
| 8) SIGFPE 9) SIGKILL 11) SIGSEGV 13) SIGPIPE |
| 14) SIGALRM 15) SIGTERM 16) SIGUSR1 17) SIGUSR2 |
| 18) SIGABND 20) SIGCHLD 27) SIGIOER |
| END OF DISPLAY+ |
+--------------------------------------------------------------------------------+
Related Information
See Information Technology--Portable Operating System Interface
for Computer Environments (POSIX) for more information about the POSIX
standards.