Do not use ttyname() - not portable