Skip to content
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

feedback: Module popen #1305

Closed
TarantoolBot opened this issue May 13, 2020 · 2 comments
Closed

feedback: Module popen #1305

TarantoolBot opened this issue May 13, 2020 · 2 comments
Assignees
Labels
design [nature] Design issue reference [location] Tarantool manual, Reference part server [area] Task relates to Tarantool's server (core) functionality

Comments

@TarantoolBot
Copy link
Collaborator

<…>eated with
popen.new() or
popen.shell()
opts (table) – options

|Return:true on success, false on error
Return type:(if success) string with read value, empty string if EOF
(if failure) nil, err|

Possible opts items are:

opts.stdout (boolean, default true, <…>

https://www.tarantool.io/en/doc/2.4/reference/reference_lua/popen/#lua-function.popen_handle.read

Technically there are failures that raise an error. The original documentation request list them first and only then possible return values (success / failure), so there should be no confusion.

Here, however, return values are listed first that may lead to false assumtion that all failures are reported using nil, err. I suggest to add Raise: subsection before Return: and Return type: ones.

What do you think?

@lenkis lenkis added 2.4 design [nature] Design issue need feedback [special status] On hold, awaiting feedback reference [location] Tarantool manual, Reference part server [area] Task relates to Tarantool's server (core) functionality labels May 13, 2020
@lenkis
Copy link
Contributor

lenkis commented May 13, 2020

@Totktonada this makes sense to me. Do you agree?

@Totktonada
Copy link
Member

I filed it :)

@Onvember Onvember removed the need feedback [special status] On hold, awaiting feedback label May 14, 2020
Onvember added a commit that referenced this issue Jun 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design [nature] Design issue reference [location] Tarantool manual, Reference part server [area] Task relates to Tarantool's server (core) functionality
Projects
None yet
Development

No branches or pull requests

4 participants