return err from isatty
osx ptsname