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

parse: fix handling of unwanted stdin #1255

Closed
wants to merge 2 commits into from
Closed

parse: fix handling of unwanted stdin #1255

wants to merge 2 commits into from

Conversation

ghost
Copy link

@ghost ghost commented May 20, 2015

There can be non-terminal (i.e. non-interactive) sessions
that are not a pipe, for example:

ssh user@host ipfs version

In this case, it looks like we should read from stdin.
Parsing stdin is accomplished by deliberately triggering
the parsing loop once.

We didn't previously check whether there is an ArgDef to support
that loop iteration.

Lars Gierth added 2 commits May 20, 2015 04:23
There can be non-terminal (i.e. non-interactive) sessions
that are *not* a pipe, for example:

	ssh user@host ipfs version

In this case, it looks like we should read from stdin.
Parsing stdin is accomplished by deliberately triggering
the parsing loop once.

We didn't previously check whether there is an ArgDef to support
that loop iteration.
@jbenet jbenet added the backlog label May 20, 2015
@ghost
Copy link
Author

ghost commented May 20, 2015

Another way to reproduce this is echo ipfs | bash.

@chriscool
Copy link
Contributor

Except the above suggested simplification, I think it is the right fix.

@krl
Copy link
Contributor

krl commented May 20, 2015

with this patch applied

echo ipfs config Addresses.Gateway /ip4/127.0.0.1/tcp/8080 | bash

Still crashes, see #1260 (thx @chriscool)

@ghost
Copy link
Author

ghost commented May 20, 2015

Closing in favor of #1263

@ghost ghost closed this May 20, 2015
@jbenet jbenet removed the backlog label May 20, 2015
@wking wking mentioned this pull request Jun 12, 2015
@ghost ghost deleted the fix-stdin-parsing branch July 13, 2015 15:36
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants