A further note: tried this out on another Sun without the windows up. Sure enough, the call in Main got the ttyname and the call in test didn't. Clearly, results are system dependent. So how about it??? Any answers out there?????? Peggy