This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
commands:builtin:wait [2013/04/14 11:41]
thebonsai [Description]
commands:builtin:wait [2018/07/12 07:36] (current)
Line 2: Line 2:
 ===== Synopsis ===== ===== Synopsis =====
-<​code>​wait [ID]</​code>​+<​code>​wait ​[-f] [-n] [ID...]</​code>​
 ===== Description ===== ===== Description =====
-The ''​wait''​ builtin command is used to +The ''​wait''​ builtin command is used to wait for job completion ​and return ​exit status.
-  * wait for a specific ​job (asynchronous command) ​and report its exit status ​if the ''​ID''​ is given +
-  * wait for all running jobs (asynchronous commands) +
-  * wait for "the next" job (''​-n''​ option)+
 +  * if ''​ID''​ is a job specification,​ it waits for all processes in the pipeline of this job
 +  * waits for a specific job (asynchronous command) and report its exit status if one or more ''​ID''​ is given
 +  * waits for all running jobs (asynchronous commands)
 +  * waits for "the next" job (''​-n''​ option)
 +  * waits for termination instead of status change (''​-f''​ option)
 +''​ID''​ may be an operating system process identifier or a shell job specification.
 ==== Options ==== ==== Options ====
 ^Option^Description^ ^Option^Description^
-|''​-n'' ​ |Waits for "the next" child to exit (as opposed to "all children"​ without this option) - since 4.3-alpha ​|+|''​-n'' ​ |Waits for "the next" child to exit (as opposed to "all children"​ without this option) ​
 +|''​-f'' ​ |Waits for the termination of the given ''​ID''​ (instead of waiting for a status change only) |
 ==== Return status ==== ==== Return status ====
  • commands/builtin/wait.1365939688.txt
  • Last modified: 2013/04/14 11:41
  • by thebonsai