Skip to content

Commit 4a8b9dc

Browse files
authored
Fixes errors from PR 5099 (#5102)
Errors were grouped incorrectly. Fixes #4174
1 parent 4d62db5 commit 4a8b9dc

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

doc/reference/reference_lua/popen.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -745,17 +745,22 @@ Below is a list of all ``popen`` functions and handle methods.
745745
:param handle ph: handle of a child process created with
746746
:ref:`popen.new() <popen-new>` or
747747
:ref:`popen.shell() <popen-shell>`
748-
:param number timeout: since version 3.2.0. The parameter defines the period in seconds for the method to wait for a resolution.
748+
:param number timeout: since version 3.2.0. The parameter defines the period in seconds for the method to wait for a resolution. The default value is "infinity".
749749
:return: (if success) formatted result
750+
751+
(if failure) ``nil, err``
750752
:rtype: res
751753

752754
Possible raised errors:
753755

754756
* ``IllegalParams``: an incorrect handle parameter
755757
* ``IllegalParams``: called on a closed handle
756758
* ``FiberIsCancelled``: cancelled by an outside code
759+
760+
Possible error reasons when ``nil, err`` is returned are:
761+
757762
* ``TimedOut``: since version 3.2.0. The error means that the method has not reached the positive result but has reached the defined **timeout**.
758-
* ``ChannelIsClosed``: since version 3.2.0. The error is returned when the target popen handle is closed from another fiber.
763+
* ``ChannelIsClosed``: since version 3.2.0. The error is returned when the target popen handle is closed during the :wait() operation.
759764

760765
The formatted result is a process status table (the same as the
761766
``status`` component of the table returned by

0 commit comments

Comments
 (0)