From dff4014918c7033db97601c7526aece631eb2d41 Mon Sep 17 00:00:00 2001 From: "a.ardeev" Date: Mon, 12 May 2025 16:24:33 +0300 Subject: [PATCH] Fixes errors from PR 5099 Errors were grouped incorrectly. Fixes #4174 --- doc/reference/reference_lua/popen.rst | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/doc/reference/reference_lua/popen.rst b/doc/reference/reference_lua/popen.rst index be0bab5f0..780b232c2 100644 --- a/doc/reference/reference_lua/popen.rst +++ b/doc/reference/reference_lua/popen.rst @@ -745,8 +745,10 @@ Below is a list of all ``popen`` functions and handle methods. :param handle ph: handle of a child process created with :ref:`popen.new() ` or :ref:`popen.shell() ` - :param number timeout: since version 3.2.0. The parameter defines the period in seconds for the method to wait for a resolution. + :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". :return: (if success) formatted result + + (if failure) ``nil, err`` :rtype: res Possible raised errors: @@ -754,8 +756,11 @@ Below is a list of all ``popen`` functions and handle methods. * ``IllegalParams``: an incorrect handle parameter * ``IllegalParams``: called on a closed handle * ``FiberIsCancelled``: cancelled by an outside code + + Possible error reasons when ``nil, err`` is returned are: + * ``TimedOut``: since version 3.2.0. The error means that the method has not reached the positive result but has reached the defined **timeout**. - * ``ChannelIsClosed``: since version 3.2.0. The error is returned when the target popen handle is closed from another fiber. + * ``ChannelIsClosed``: since version 3.2.0. The error is returned when the target popen handle is closed during the :wait() operation. The formatted result is a process status table (the same as the ``status`` component of the table returned by