8000 Fails to read piped stdin in windows · Issue #229 · chzyer/readline · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Fails to read piped stdin in windows #229
Open
@YairHalberstadt

Description

@YairHalberstadt

When piping stdin from another process on windows, readline fails to read the piped stdin.

Say my binary does this:

func main() {
	rl, err := NewEx(&Config{})
	if err != nil {
		fmt.Println(err)
		return
	}
	line, err := rl.Readline()
	if err != nil {
		fmt.Println(err)
		return
	}
	fmt.Println(line)
}

And then I use it as follows

echo "hello world" | MyBinary.exe

fails with EOF instead of printing hello world.

On linux this works as expected.

The issue appears to be in rawreader_windows.go where the call to ReadConsoleInputW returns "invalid function".

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

      0