From 4cfeeeb61ae8daa2a4b06572024786e56f23504c Mon Sep 17 00:00:00 2001 From: Alex Brainman Date: Sun, 30 Oct 2016 18:22:20 +1100 Subject: [PATCH] http2/h2i: do not assume that stdin value is always 0 Fixes golang/go#17661 Change-Id: Iff004af969c694dde9bc3c56add3a419ab1beac7 Reviewed-on: https://go-review.googlesource.com/32373 Reviewed-by: Brad Fitzpatrick Run-TryBot: Alex Brainman TryBot-Result: Gobot Gobot --- http2/h2i/h2i.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http2/h2i/h2i.go b/http2/h2i/h2i.go index 27e63a4c..228edf8a 100644 --- a/http2/h2i/h2i.go +++ b/http2/h2i/h2i.go @@ -168,7 +168,7 @@ func (app *h2i) Main() error { app.framer = http2.NewFramer(tc, tc) - oldState, err := terminal.MakeRaw(0) + oldState, err := terminal.MakeRaw(int(os.Stdin.Fd())) if err != nil { return err }