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

Pipe closing isn't handled gracefully #20

Open
Fierthraix opened this issue Jul 4, 2018 · 1 comment
Open

Pipe closing isn't handled gracefully #20

Fierthraix opened this issue Jul 4, 2018 · 1 comment

Comments

@Fierthraix
Copy link
Contributor

When loop is piped to some program that only takes a subset of loop's output the program prints throws a panic message that may confuse people when used as part of a long command chain.

Example:

user@pc $ loop 'echo $COUNT' | head -n 2
0
1
thread 'main' panicked at 'failed printing to stdout: Broken pipe (os error 32)', libstd/io/stdio.rs:692:9
note: Run with `RUST_BACKTRACE=1` for a backtrace.

The expected behaviour is that loop exits gracefully upon detecting the pipe is closed.

@Miserlou
Copy link
Owner

Miserlou commented Jul 4, 2018

Interesting! stdout isn't really properly handled yet, discussion here: #2

Thank you for reporting!

@benjibee benjibee mentioned this issue Oct 23, 2019
2 tasks
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

No branches or pull requests

2 participants