From 37a8f1623592efbcb249d8ca0acd0c6167d37ed8 Mon Sep 17 00:00:00 2001
From: Přemysl Eric Janouch <p@janouch.name>
Date: Mon, 6 Jan 2025 14:27:53 +0100
Subject: wdye: enable waiting for processes

---
 tools/wdye/wdye.adoc | 10 ++++++++++
 1 file changed, 10 insertions(+)

(limited to 'tools/wdye/wdye.adoc')

diff --git a/tools/wdye/wdye.adoc b/tools/wdye/wdye.adoc
index 6282af2..d901400 100644
--- a/tools/wdye/wdye.adoc
+++ b/tools/wdye/wdye.adoc
@@ -94,6 +94,16 @@ PROCESS:eof {[notransfer=true, ] [value1, ...]}
 Returns a new end-of-file _pattern_, which matches the entire read buffer
 contents once the child process closes the terminal.
 
+PROCESS:wait ([nowait])
+~~~~~~~~~~~~~~~~~~~~~~~
+Waits for the program to terminate, and returns three values:
+a combined status as used by `$?` in shells,
+an exit status, and a termination signal number.
+One of the latter two values will be _nil_, as appropriate.
+
+When the *nowait* option is _true_, the function returns immediately.
+If the process hasn't terminated yet, the function then returns no values.
+
 PROCESS:default {[timeout, ] [notransfer=true, ] [value1, ...]}
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Returns a new _pattern_ combining *wdye.timeout* with *eof*.
-- 
cgit v1.2.3-70-g09d2

