Skip to content

Pipe closing isn't handled gracefully #20

Open

Description

@Fierthraix

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.

Activity

  1. Miserlou commented on Jul 4, 2018

    @Miserlou
    Owner

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

    Thank you for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions