Need Linux Help:Problem with disabling echo
Ok linux programmers I need some help. I am writing a simple client - server program that lhas the client connecting to the server via username and password. When entering the password I want to disable echo so the password is not displayed on the screen. I have it working so that the password isnt displayed but when I exit out of my program all the prompts and everything else is just a mess of scrambled sybols causing me to have to go to a new terminal each time, because I cant really do anything on the current terminal in its state.
This is what my code looks like
static struct termios Otty,Ntty
Ntty = Otty;
Ntty.c_lflag &= ~ECHO;
/*read input in yadda yadda yadda*/
It works except upon exiting everyting is jarbled. Any Suggestions?