make sure /dev/tty file handle stays open
make sure /dev/tty file handle stays open

*os.File has a finalizer which will close the file when the *os.File
gets garbage collected. Because tty is only live for the duration of
init, it will eventually get collected, and ttyFd will contain a bad
file descriptor, causing the ioctl in terminalWidth to fail.

Instead, make tty a global variable, holding either our /dev/tty file or
os.Stdin (there should be no need for using syscall.Stdin.)

0x00evil/pb,gaowenbin/pb,sevki/pb,satelliz/pb,mvo5/golang-pb,yh453926638/pb,charignon/pb,cheggaaa/pb,harshavardhana/pb,guaiguaihw/pb