Skip to content

Reader fails when seeking on /dev/stdin #17

@ckohnert

Description

@ckohnert

Go (as of 1.9 at least) reports os.Stdin as an io.Seeker, however when receiving stdin as a pipe, any seek attempt later on will fail. In msgp's case this breaks when valid input is being piped in.

I've whipped up an extra check that tries to detect this situation and fallback to non-io.Seeker appropriately.

patch-stdin-seeker-workaround.txt

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