wait
喵喵 发表于 2020-07-05 08:18浏览次数:
在类似Unix的操作系统上,wait是一个shell命令,它等待给定进程完成,然后返回其退出状态。
本文档涵盖了bash内置版本的wait。
On Unix-like operating systems, wait is a shell command that waits for a given process to complete, then returns its exit status.
This document covers the bash built-in version of wait.
目录:
1 wait 运行系统环境
2 wait 语法
3 wait 描述
4 wait 示例
wait 运行系统环境
wait 语法
wait 描述
等待进程ID PID(或作业ID作业ID指定的作业)标识的进程,并报告其终止状态。如果未提供ID,则等待所有当前活动的子进程,返回状态为零。如果ID是作业规范,等待等待作业管道中的所有进程。
pid
|
命令的无符号十进制整数进程ID,该实用程序将等待终止。
|
jobid
|
一个作业控制作业ID,它标识要等待的后台进程组。作业控制作业ID表示法仅适用于当前shell执行环境中的等待调用,也仅适用于支持作业控制选项的系统。
|
wait waits for the process identified by process ID pid (or the job specified by job ID jobid), and reports its termination status. If an ID is not given, wait waits for all currently active child processes, and the return status is zero. If the ID is a job specification, wait waits for all processes in the job's pipeline.
pid
|
The unsigned decimal integer process ID of a command, for which the utility is to wait for the termination.
|
jobid
|
A job control job ID that identifies a background process group to wait for. The job control job ID notation is applicable only for invocations of wait in the current shell execution environment, and only on systems supporting the job control option.
|
wait 示例
wait 2017
等待流程2017终止,并返回其退出状态。
wait 2017
Wait for process
2017 to terminate, and return its exit status.