First of all, let me state that this is a stupid question. I thought that gtty and stty are the same as ioctl with TIOCGETP and TIOCSETP set. But somehow, when I call ioctl(0,TIOCGETP,&buf) the result is an empty buf. When I do a gtty(0,&buf) it works. Any ideas? - Stephen