alan@ibgames.com writes:
Hi,
I need to turn off the echo on a socket while I get a password.
I tried:
struct termios termios_p; tcgetattr(sd,&termios_p); termios_p.c_lflag &= ~ECHO; tcsetattr(sd,TCSANOW,&termios_p);
where sd is the socket descriptor.
It didn't seem to make any difference. Am I doing something wrong, or is this not the way it is done these days?
Can any one assist, please?
Your socket is not necessarily a terminal (that is what pseudo
terminals are for) what exactly is on both sides of this socket?
Also you should check the error returns like so:
#include