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

This commit is contained in:
Adrien Delorme 2019-02-26 11:55:39 +01:00
parent b32449cdcc
commit 4e55278839
1 changed files with 9 additions and 9 deletions

View File

@ -24,16 +24,16 @@ var (
)
func init() {
echoLockMutex.Lock()
defer echoLockMutex.Unlock()
// echoLockMutex.Lock()
// defer echoLockMutex.Unlock()
var err error
tty, err = os.Open("/dev/tty")
istty = true
if err != nil {
tty = os.Stdin
istty = false
}
// 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.