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

fio: provide access to stdin/stdout/stderr #1338

Open
kostja opened this issue Feb 18, 2016 · 8 comments
Open

fio: provide access to stdin/stdout/stderr #1338

kostja opened this issue Feb 18, 2016 · 8 comments
Labels
feature A new functionality good first issue Good for newcomers
Milestone

Comments

@kostja
Copy link
Contributor

kostja commented Feb 18, 2016

Make it possible to read stdin/stdout/stderr using fio API. Update the documentation.

@kostja kostja added this to the 1.6.9 milestone Feb 18, 2016
@kostja kostja added the feature A new functionality label Feb 18, 2016
@rtsisyk
Copy link
Contributor

rtsisyk commented Apr 1, 2016

Who need this feature in 1.6.x? Please consider to move to 1.7.x

@rtsisyk
Copy link
Contributor

rtsisyk commented Jul 21, 2016

There is no customer => wishlist

@rtsisyk rtsisyk modified the milestones: wishlist, 1.6.9 Jul 21, 2016
@kostja kostja added the good first issue Good for newcomers label Feb 7, 2018
@upkrf
Copy link

upkrf commented Oct 9, 2019

Our team wants this feature ASAP!

@olegrok
Copy link
Collaborator

olegrok commented Oct 9, 2019

quite strange way (read as workaround) to do this

fd = fio.open('/dev/null')
fd.fh = 2 -- or 1 for stdout
tarantool> fd:write('test')
test---
- true
...

@igormunkin
Copy link
Collaborator

@olegrok, it looks more like a bug than a workaround. IMHO, fd.fh field ought to be immutable.
@kyukhin, I think it have to be fixed.

@printercu
Copy link

@cyrillos looks like non-blocking pipe io from #4031 can be useful for this one.

@cyrillos cyrillos self-assigned this Dec 20, 2019
@printercu
Copy link

@igormunkin I think even if io.stdin:read will be fixed to be non-blocking, there should be fio interface for this standard descriptors because fio and io have different api. Modules like csv work only with fio.

olegrok added a commit that referenced this issue Apr 4, 2020
This patch introduces fio API for interaction with
stdin/stdout/stderr streams.

Closes #1338

@TarantoolBot document
Title: fio provides access to stdin/stdout/stderr

Now access to standard streams is available via:
  * fio.stdin
  * fio.stdout
  * fio.stderr

Each of this streams have usual fio file interface.

Example:
```lua
fio.stdin:read(5) -- read 5 bytes from stdin
fio.stdout:write("Hello") -- write "Hello" to stdout
fio.stderr:write("Error") -- write "Error" to stderr
```
olegrok added a commit that referenced this issue Apr 4, 2020
This patch introduces fio API for interaction with
stdin/stdout/stderr streams.

Closes #1338

@TarantoolBot document
Title: fio provides access to stdin/stdout/stderr

Now access to standard streams is available via:
  * fio.stdin
  * fio.stdout
  * fio.stderr

Each of this streams have usual fio file interface.

Example:
```lua
fio.stdin:read(5) -- read 5 bytes from stdin
fio.stdout:write("Hello") -- write "Hello" to stdout
fio.stderr:write("Error") -- write "Error" to stderr
```
@olegrok olegrok closed this as completed Nov 8, 2021
@olegrok olegrok reopened this Nov 10, 2021
@olegrok
Copy link
Collaborator

olegrok commented Nov 10, 2021

Sorry, it was a mistake. Reopened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new functionality good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

7 participants