Skip to content

Fixes errors from PR 5099 #5102

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 12, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions doc/reference/reference_lua/popen.rst
Original file line number Diff line number Diff line change
Expand Up @@ -745,17 +745,22 @@ Below is a list of all ``popen`` functions and handle methods.
:param handle ph: handle of a child process created with
:ref:`popen.new() <popen-new>` or
:ref:`popen.shell() <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:

* ``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
Expand Down