Revert "cheggaaa.pb: try to not open tty at init to see if it causes #7299"

This reverts commit 4e55278839.
pull/7352/head
Adrien Delorme 7 years ago
parent 4e55278839
commit c588a8a24d

@ -24,16 +24,16 @@ var (
)
func init() {
// echoLockMutex.Lock()
// defer echoLockMutex.Unlock()
// var err error
// tty, err = os.Open("/dev/tty")
// istty = true
// if err != nil {
// tty = os.Stdin
// istty = false
// }
echoLockMutex.Lock()
defer echoLockMutex.Unlock()
var err error
tty, err = os.Open("/dev/tty")
istty = true
if err != nil {
tty = os.Stdin
istty = false
}
}
// terminalWidth returns width of the terminal.

Loading…
Cancel
Save