You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/reference/reference_lua/popen.rst
+7-2Lines changed: 7 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -745,17 +745,22 @@ Below is a list of all ``popen`` functions and handle methods.
745
745
:param handle ph: handle of a child process created with
746
746
:ref:`popen.new() <popen-new>` or
747
747
: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".
749
749
:return: (if success) formatted result
750
+
751
+
(if failure) ``nil, err``
750
752
:rtype: res
751
753
752
754
Possible raised errors:
753
755
754
756
* ``IllegalParams``: an incorrect handle parameter
755
757
* ``IllegalParams``: called on a closed handle
756
758
* ``FiberIsCancelled``: cancelled by an outside code
759
+
760
+
Possible error reasons when ``nil, err`` is returned are:
761
+
757
762
* ``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.
759
764
760
765
The formatted result is a process status table (the same as the
0 commit comments