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

Handle broken pipe errors #1113

Merged
merged 1 commit into from
Jan 28, 2015
Merged

Conversation

jamesls
Copy link
Member

@jamesls jamesls commented Jan 27, 2015

If stdout is being piped to another process and that process
closes stdin, then we get an IOError with a broken pipe message.
If the reading end of the pipe closes the pipe, we should just exit.
This is a normal (and common) case and we shouldn't be printing
an error message when this happens.

The error was being raised on the .flush() call to the stream.

Before:

$ aws ec2 describe-instances | head -n 1
{

[Errno 32] Broken pipe

After:

$ aws ec2 describe-instances | head -n 1
{

cc @kyleknap @danielgtaylor

If stdout is being piped to another process and that process
closes stdin, then we get an IOError with a broken pipe message.
If the reading end of the pipe closes the pipe, we should just exit.
This is a normal (and common) case and we shouldn't be printing
an error message when this happens.
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.02%) to 91.75% when pulling ddec341 on jamesls:fix-broken-pipe-error into ecce9c6 on aws:develop.

@kyleknap
Copy link
Contributor

Looks good. 🚢 Even though coveralls shows a drop, you added a test for the case. So you are good.

@jamesls jamesls merged commit ddec341 into aws:develop Jan 28, 2015
thoward-godaddy pushed a commit to thoward-godaddy/aws-cli that referenced this pull request Feb 12, 2022
* chore(version): set 0.14.3.dev1 version (aws#1112) (aws#1113)

* Depend on development version of lambda-builders for dev builds (aws#1111)

* Depend on development version of lambda-builders for dev builds

* Adding prod.txt to manifest

* Splitting dev and tool dependencies

* fix(build): Resolve path after .aws-sam is created (aws#1110)

* fix(build): Resolve path after .aws-sam is created

* fix: build (make pr)

* Design and implementation for producing debug build artifacts (aws#1095)

* design: Initial Design for producing debug artifacts

* initial implementation

* Adding unit tests

* Integration test with debug build mode

* Adjust Design doc and add keyword arg to a call

* fix(dotnet): init template fixes (aws#1117)

* chore(version): set 0.15.0 (aws#1125)

* Revert "Depend on development version of lambda-builders for dev builds (aws#1111)" (aws#1128)

This reverts commit 7e9de790e23791ba176faff2030286db4007e503.

* Bumping to Lambda Builders 0.3.0 (aws#1129)

Bumping to Lambda Builders 0.3.0

* fix(func-tests): add dependency manager param (aws#1130)
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