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

os/exec: hungup error on Plan 9 while copying stdin #35753

Closed
fhs opened this issue Nov 21, 2019 · 1 comment · Fixed by sthagen/golang-go#82
Closed

os/exec: hungup error on Plan 9 while copying stdin #35753

fhs opened this issue Nov 21, 2019 · 1 comment · Fixed by sthagen/golang-go#82
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. OS-Plan9

Comments

@fhs
Copy link
Contributor

fhs commented Nov 21, 2019

What version of Go are you using (go version)?

$ go version
go version devel +master Thu Nov 21 01:22:38 EST 2019 plan9/386

What did you do?

Run this program:

package main

import (
	"log"
	"os"
	"os/exec"
	"strings"
)

func main() {
	cmd := exec.Command("date")
	cmd.Stdin = strings.NewReader("hello\n")
	cmd.Stdout = os.Stdout
	cmd.Stderr = os.Stderr
	if err := cmd.Run(); err != nil {
		log.Fatalf("Run failed: %v", err)
	}
}

What did you expect to see?

No error

What did you see instead?

cpu% go run main.go
Thu Nov 21 12:33:54 EST 2019
2019/11/21 12:33:54 Run failed: write |1: i/o on hungup channel
exit status: 'main 100206: 1'

Note: This issue is causing some go/packages tests to fail. See https://build.golang.org/log/f8afda4bf9009c118c39705ccf38712f705ab249

I propose ignoring this error, similar to how EPIPE is currently being ignored in unix.

@gopherbot Please add labels OS-Plan9, NeedsFix

@gopherbot gopherbot added NeedsFix The path to resolution is known, but the work has not been done. OS-Plan9 labels Nov 21, 2019
@gopherbot
Copy link

Change https://golang.org/cl/208223 mentions this issue: os/exec: ignore hungup error while copying stdin on Plan 9

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. OS-Plan9
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants