summaryrefslogtreecommitdiff
path: root/Doc/help/wait
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2020-02-16 03:29:19 +0100
committerAxel Beckert <abe@deuxchevaux.org>2020-02-16 03:29:19 +0100
commit2794556a41b50f635b6aa49c32fc6ca7bc08c901 (patch)
tree9557d7a073d4b24e9f10cdc337d9a819eb65ad1a /Doc/help/wait
parentb0d5cb56971618762ab13dbdb8fb17753f07f0f6 (diff)
parent94c033d2e281eb1f49e8366d21fc259ce8c0c4f5 (diff)
downloadzsh-2794556a41b50f635b6aa49c32fc6ca7bc08c901.tar.gz
zsh-2794556a41b50f635b6aa49c32fc6ca7bc08c901.zip
Update upstream source from tag 'upstream/5.8'
Update to upstream version '5.8' with Debian dir b7a9cb7b782a12a49dca06e06ca2554b5a95bf93
Diffstat (limited to 'Doc/help/wait')
-rw-r--r--Doc/help/wait25
1 files changed, 25 insertions, 0 deletions
diff --git a/Doc/help/wait b/Doc/help/wait
new file mode 100644
index 000000000..876a9669f
--- /dev/null
+++ b/Doc/help/wait
@@ -0,0 +1,25 @@
+wait [ job ... ]
+ Wait for the specified jobs or processes. If job is not given
+ then all currently active child processes are waited for. Each
+ job can be either a job specification or the process ID of a job
+ in the job table. The exit status from this command is that of
+ the job waited for. If job represents an unknown job or process
+ ID, a warning is printed (unless the POSIX_BUILTINS option is
+ set) and the exit status is 127.
+
+ It is possible to wait for recent processes (specified by
+ process ID, not by job) that were running in the background even
+ if the process has exited. Typically the process ID will be
+ recorded by capturing the value of the variable $! immediately
+ after the process has been started. There is a limit on the
+ number of process IDs remembered by the shell; this is given by
+ the value of the system configuration parameter CHILD_MAX. When
+ this limit is reached, older process IDs are discarded, least
+ recently started processes first.
+
+ Note there is no protection against the process ID wrapping,
+ i.e. if the wait is not executed soon enough there is a chance
+ the process waited for is the wrong one. A conflict implies
+ both process IDs have been generated by the shell, as other pro-
+ cesses are not recorded, and that the user is potentially inter-
+ ested in both, so this problem is intrinsic to process IDs.