In article <1211 at tuewsd.win.tue.nl> I write: > if (getpeername(0, &sa, &length) >= 0) { to obtain the name of the host one is logged in from. Obviously, this does not work when stdin is connected to a pty. Oops. Good thing this ain't comp.unix.wizards.