From 9aa0c8c2f34b42e671d6418bd2cc95c79d3b7d54 Mon Sep 17 00:00:00 2001
From: Laurent Bercot
Date: Wed, 20 Apr 2022 23:43:43 +0000
Subject: Prepare for 2.9.0.0; rewrite "wait"
Signed-off-by: Laurent Bercot
---
doc/wait.html | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
(limited to 'doc/wait.html')
diff --git a/doc/wait.html b/doc/wait.html
index a092859..a66cefc 100644
--- a/doc/wait.html
+++ b/doc/wait.html
@@ -29,7 +29,7 @@
- wait [ -I | -i ] [ -r | -t timeout ] { [ pids... ] } prog...
+ wait [ -I | -i ] [ -a | -o ] [ -r | -t timeout ] { [ pids... ] } prog...
@@ -57,7 +57,18 @@ milliseconds, they will not be reaped.
waiting for children to die, it will still
exec into prog.... This is the default.
- -i : strict. If wait times out, it
-will print an error message and exit 1.
+will print an error message and exit 99.
+ - -o : wait for one of the listed
+pids — exec into prog as soon as one of the
+listed children dies. (If no pid is listed, wait for one child to die.)
+The ! environment variable will be set to the
+pid that died, and the ? environment variable will contain an
+approximation of its exit code. If no
+listed child has died before wait has to exec (either because
+it timed out or it has no suitable children left), the ? and
+! environment variables are unset.
+- -a : wait for all of the listed pids.
+Do not touch the ! or ? variables. This is the default.
Notes
@@ -65,8 +76,9 @@ will print an error message and exit 1.
- For POSIX
compatibility, wait also works when it cannot find a block.
-In that case, all its command line is interpreted as pids...
-arguments and it does not execute into a program. Instead, it exits
+In that case, all the options are still supported and have the same
+effect, but the rest of the command line is interpreted as pids...
+arguments and wait does not execute into a program; instead, it exits
with a conforming exit code.
--
cgit v1.3.1