[JM:01558] [POST:DP] util-linux kill.1

アーカイブの一覧に戻る
Yuichi SATO ysato****@ybb*****
2019年 7月 26日 (金) 21:19:47 JST


<STATUS>
stat: DP
ppkg: util-linux
page: kill.1
date: 2019/07/26
mail: ysato****@ybb*****
name: SATO Yuichi
</STATUS>

.\" Copyright 1994 Salvatore Valente (svale****@mit*****)
.\" Copyright 1992 Rickard E. Faith (faith****@cs*****)
.\" May be distributed under the GNU General Public License
.\"
.\" Japanese Version Copyright (c) 2000 Asakawa Satoshi
.\"         all rights reserved.
.\" Translated Sat Dec  2 22:52:40 JST 2000
.\"         by Asakawa Satoshi <rod****@i*****>
.\" Updated Tue Arg 21 JST 2001 by Kentaro Shirakata <argra****@ub32*****>
.\" UPdated & Modified Thu Jul 25 20:31:43 JST 2019
.\"         by Yuichi SATO <ysato****@ybb*****>
.\"
.TH KILL 1 "July 2014" "util-linux" "User Commands"
.\"O .SH NAME
.\"O kill \- terminate a process
.SH 名前
kill \- プロセスを終了させる
.\"O .SH SYNOPSIS
.SH 書式
.B kill
.RB [ \- \fIsignal\fR| \-s
.IR signal | \fB-p\fP ]
.RB [ \-q
.IR value ]
.RB [ \-a ]
.RB [ \-\- ]
.IR pid | name ...
.br
.B kill \-l
.RI [ number ]
.RB "| " \-L
.\"O .SH DESCRIPTION
.SH 説明
.\"O The command
.\"O .B kill
.\"O sends the specified \fIsignal\fR to the specified processes or process groups.
.B kill
コマンドは、指定した \fIsignal\fR を指定したプロセスまたはプロセスグループへ送る。
.PP
.\"O If no signal is specified, the TERM signal is sent.
シグナルが指定されない場合、TERMシグナルを送る。
.\"O The default action for this signal is to terminate the process.
このシグナルのデフォルトの挙動は、プロセスの終了である。
.\"O This signal should be used in preference to the
.\"O KILL signal (number 9), since a process may install a handler for the
.\"O TERM signal in order to perform clean-up steps before terminating in
.\"O an orderly fashion.
このシグナルは、Kill シグナル (数値 9) より優先して使うべきである。
なぜなら、プロセスは TERM シグナルに対するハンドラーを実装しており、
通常のやり方では、終了の前にクリーンアップのステップを実行するためである。
.\"O If a process does not terminate after a TERM signal has been sent,
.\"O then the KILL signal may be used; be aware that the latter signal
.\"O cannot be caught, and so does not give the target process the opportunity
.\"O to perform any clean-up before terminating.
TERM シグナルを送った後にプロセスが終了しない場合、
KILL シグナルを使うことができる。
KILL シグナルはキャッチされないので、対象プロセスの終了前に
クリーンアップを実行する機会を与えない点に注意すること。
.PP
.\"O Most modern shells have a builtin kill command, with a usage rather similar to
.\"O that of the command described here.  The
.\"O .BR \-\-all ,
.\"O .BR \-\-pid ", and"
.\"O .B \-\-queue
.\"O options, and the possibility to specify processes by command name, are local extensions.
最近のシェルのほとんどには、組み込みの kill 機能があり、
ここで説明しているコマンドと同じような使い方をする。
.BR \-\-all ,
.BR \-\-pid ,
.B \-\-queue
オプション、そしてコマンド名で PID を指定する方法はローカルな拡張である。
.PP
.\"O If \fIsignal\fR is 0, then no actual signal is sent, but error checking is still performed.
\fIsignal\fR が 0 の場合、実際のシグナルは送られないが、
エラーチェックは実行される。

.\"O .SH ARGUMENTS
.SH 引数
.\"O The list of processes to be signaled can be a mixture of names and PIDs.
シグナルを送るプロセスのリストは、
名前と PID を混ぜることができる。
.TP
.I pid
.\"O Each
.\"O .I pid
.\"O can be one of four things:
各
.I pid
は以下の 4 つのいずれかである:
.RS
.TP
.I n
.\"O where
.\"O .I n
.\"O is larger than 0.  The process with PID
.\"O .I n
.\"O is signaled.
.I n
が 0 より大きい場合、PID
.I n
にシグナルが送られる。
.TP
.B 0
.\"O All processes in the current process group are signaled.
現在のプロセスグループのすべてのプロセスにシグナルが
送られる。
.TP
.B -1
.\"O All processes with a PID larger than 1 are signaled.
PID が 1 より大きいすべてのプロセスにシグナルが送られる。
.TP
.BI - n
.\"O where
.\"O .I n
.\"O is larger than 1.  All processes in process group
.\"O .I n
.\"O are signaled.  When an argument of the form '-n' is given, and it is meant to
.\"O denote a process group, either a signal must be specified first, or the
.\"O argument must be preceded by a '--' option, otherwise it will be taken as the
.\"O signal to send.
.I n
が 1 より大きい場合、プロセスグループ
.I n
のすべてのプロセスにシグナルが送られる。
シグナルを最初に指定した場合、または、この引数の前に '--' オプションを指定した場合、
引数を '-n' の形式で指定すると、プロセスグループを使うことを意味する。
そのようにしない場合、送るシグナルとして解釈される。
.RE
.TP
.I name
.\"O All processes invoked using this \fIname\fR will be signaled.
この \fIname\fR を使って起動されたすべてのプロセスにシグナルが送られる。

.\"O .SH OPTIONS
.SH オプション
.TP
\fB\-s\fR, \fB\-\-signal\fR \fIsignal\fR
.\"O The signal to send.  It may be given as a name or a number.
送るシグナルを指定する。
シグナルは名前か、または番号で指定する。
.TP
\fB\-l\fR, \fB\-\-list\fR [\fInumber\fR]
.\"O Print a list of signal names, or convert the given signal number to a name.
.\"O The signals can be found in
.\"O .I /usr/\:include/\:linux/\:signal.h
シグナル名のリスト、または指定した数値を変換した名前を表示する。
シグナルは
.I /usr/\:include/\:linux/\:signal.h
の中で定義されている。
.TP
\fB\-L\fR, \fB\-\-table\fR
.\"O Similar to \fB\-l\fR, but it will print signal names and their corresponding
.\"O numbers.
\fB\-l\fR と同様であるが、シグナル名と対応する数値を表示する。
.TP
\fB\-a\fR, \fB\-\-all\fR
.\"O Do not restrict the command-name-to-PID conversion to processes with the same
.\"O UID as the present process.
デフォルトでは、コマンド名から PID への変換は
現在のプロセスと同じ UID を持つものに制限されているが、
その制限を外す。
.TP
\fB\-p\fR, \fB\-\-pid\fR
.\"O Only print the process ID (PID) of the named processes, do not send any
.\"O signals.
指定したプロセスのプロセスID (PID) の表示のみをさせる。
何のシグナルも送らない。
.TP
\fB\-\-verbose\fR
.\"O Print PID(s) that will be signaled with kill along with the signal.
kill でシグナルが送られる PID を表示する。
.TP
\fB\-q\fR, \fB\-\-queue\fR \fIvalue\fR
.\"O Use
.\"O .BR sigqueue (3)
.\"O rather than
.\"O .BR kill (2).
.BR kill (2)
ではなく
.BR sigqueue (3)
を使う。
.\"O The
.\"O .I value
.\"O argument is an integer that is sent along with the signal.  If the
.\"O receiving process has installed a handler for this signal using the
.\"O .B SA_SIGINFO
.\"O flag to
.\"O .BR sigaction (2),
.\"O then it can obtain this data via the
.\"O .I si_sigval
.\"O field of the
.\"O .I siginfo_t
.\"O structure.
.I value
引数は、シグナルとして送られる整数値である。
シグナルを受け取るプロセスが、
.BR sigaction (2)
に対する
.B SA_SIGINFO
フラグを使ってシグナルに対するハンドラーを実装している場合、
.I siginfo_t
構造体の
.I si_sigval
フィールドを使ってデータを取得できる。

.\"O .SH NOTES
.SH 注意
.\"O Although it is possible to specify the TID (thread ID, see
.\"O .BR gettid (2))
.\"O of one of the threads in a multithreaded process as the argument of
.\"O .BR kill ,
.\"O the signal is nevertheless directed to the process
.\"O (i.e., the entire thread group).
マルチスレッドプロセスの 1 つのスレッドの TID (スレッド ID
.BR gettid (2)
を参照) を
.B kill
の引数として指定することができるにも関わらず、
シグナルはプロセス (つまり、スレッドグループ全体) に向けられる。
.\"O In other words, it is not possible to send a signal to an
.\"O explicitly selected thread in a multithreaded process.
言い換えると、マルチスレッドプロセスの明示的に選択したスレッドには
シグナルを送ることはできない。
.\"O The signal will be delivered to an arbitrarily selected thread
.\"O in the target process that is not blocking the signal.
シグナルは、対象プロセスの中のシグナルをブロックしない
任意の選択されたスレッドに送られる。
.\"O For more details, see
.\"O .BR signal (7)
.\"O and the description of
.\"O .B CLONE_THREAD
.\"O in
.\"O .BR clone (2).
より詳細は、
.BR signal (7)
と
.BR clone (2)
の
.B CLONE_THREAD
の説明を参照すること。

.\"O .SH RETURN CODES
.SH 返り値
.\"O .B kill
.\"O has the following return codes:
.B kill
には以下の返り値がある:
.TP
.B 0
.\"O success
成功
.TP
.B 1
.\"O failure
失敗
.TP
.B 64
.\"O partial success (when more than one process specified)
部分的に成功 (2 個以上のプロセスが指定された場合)

.\"O .SH SEE ALSO
.SH 関連項目
.BR bash (1),
.BR tcsh (1),
.BR sigaction (2),
.BR kill (2),
.BR sigqueue (3),
.BR signal (7)

.\"O .SH AUTHORS
.SH 著者
.MT svale****@mit*****
Salvatore Valente
.ME
.br
.MT kzak****@redha*****
Karel Zak
.ME
.br
.PP
.\"O The original version was taken from BSD 4.4.
オリジナルバージョンは、BSD 4.4 から入手した。

.\"O .SH AVAILABILITY
.SH 入手方法
.\"O The kill command is part of the util-linux package and is available from
.\"O .UR https://\:www.kernel.org\:/pub\:/linux\:/utils\:/util-linux/
.\"O Linux Kernel Archive
.\"O .UE .
kill コマンドは、util-linux パッケージの一部であり、
.UR https://\:www.kernel.org\:/pub\:/linux\:/utils\:/util-linux/
Linux Kernel Archive
.UE
から入手できる。



linuxjm-discuss メーリングリストの案内
アーカイブの一覧に戻る