- wait
-
Behaves like wait(2) on your system: it waits for a child process to terminate and returns the pid of the deceased process, or
-1if there are no child processes. The status is returned in$?and${^CHILD_ERROR_NATIVE}. Note that a return value of-1could mean that child processes are being automatically reaped, as described in perlipc.wait(2) と同様に振る舞います: チャイルドプロセスが終了するのを待ち、 消滅したプロセスの pid を返します; チャイルドプロセスが存在しないときには、
-1を返します。 ステータスは$?と${^CHILD_ERROR_NATIVE}に返されます。 perlipc に書いているように、返り値が-1の場合は子プロセスが 自動的に刈り取られたことを意味するかもしれないことに注意してください。If you use
waitin your handler for$SIG{CHLD}, it may accidentally wait for the child created byqxor system. See perlipc for details.waitを$SIG{CHLD}のハンドラで使うと、誤ってqxや system によって 作られた子を待つことになるかも知れません。 詳しくは perlipc を参照してください。Equivalent to
waitpid(-1, 0).waitpid(-1, 0)と等価です。Portability issues: "wait" in perlport.
移植性の問題: "wait" in perlport。