aboutsummaryrefslogtreecommitdiff
path: root/ja_JP.eucJP/man/man1/wait.1
blob: 2f0aeb60c42064a715423568e585816b54e5f517 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
.\" Copyright (c) 1991, 1993
.\"	The Regents of the University of California.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\"    must display the following acknowledgement:
.\"	This product includes software developed by the University of
.\"	California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\"    may be used to endorse or promote products derived from this software
.\"    without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\"     @(#)wait.1	8.1 (Berkeley) 6/5/93
.\"	%Id: wait.1,v 1.2 1997/03/07 03:27:50 jmg Exp %
.\"
.\" jpman %Id: wait.1,v 1.3 1997/07/20 08:00:43 konuma Stab %
.\"
.Dd June 5, 1993
.Dt WAIT 1
.Os FreeBSD
.Sh 名称
.Nm wait
.Nd プロセスの終了を待つ
.Sh 書式
.Nm wait
.Op Ar pid
.Sh 解説

引数なしで起動された場合、
.Nm wait
はバックグラウンドで実行されている子プロセスが全て終了するまで待ちます。
.Pp
オプションは以下のとおりです。
.Bl -tag -width Ds
.It Ar pid
.Ar pid
が指定され、それがバックグラウンドで実行されている
子プロセスのプロセスIDであった場合、
.Nm wait
はそのプロセスが終了するまで待ち、そのプロセスの
ステータス情報を取得します。他のプロセスのステータス情報は
取得しません。
.Pp
pidが指定され、そのプロセスIDがバックグラウンドで
実行されている子プロセスのものでなかったら、
.Nm wait
はプロセスの終了を待たず終了します。
.El
.Pp
.Nm wait
は以下のうちのいずれかの戻り値を返します。
.Bl -tag -width Ds
.It \&0
.Nm wait
が引数なしで起動されて、全てのバックグラウンドの
子プロセスが終了するか、pidによって指定されたプロセスが
0を返して正常に終了した場合。
.It \&>\&0
指定されたプロセスが存在せず、その終了ステータスが無効で
あるか、または、指定されたプロセスが存在するかその終了ステータス
が有効で、戻り値が0でない場合。
.El
.Pp
指定されたプロセスがシグナルを受けて異常終了した場合は
.Nm wait
はそのプロセスの戻り値を返します。
.Sh 規格
.Nm wait
は
.St -p1003.2
互換となるように作られています。