LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 09-22-2003, 04:34 PM   #1
ebh1
LQ Newbie
 
Registered: Sep 2003
Posts: 4

Rep: Reputation: 0
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
tcgettattr(0,&Otty);
Ntty = Otty;
Ntty.c_lflag &= ~ECHO;
tcsetattr(0,TCSANOW,&Ntty);
/*read input in yadda yadda yadda*/
tcsetattr(0,TCSANOW,&Otty);

It works except upon exiting everyting is jarbled. Any Suggestions?
 
Old 09-22-2003, 05:04 PM   #2
Yamakaze
LQ Newbie
 
Registered: Sep 2003
Distribution: SuSE 8.2 Pro
Posts: 9

Rep: Reputation: 0

Last edited by Yamakaze; 09-22-2003 at 05:10 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Kphone echo (echo echo) scabies Linux - Software 0 10-18-2004 03:59 PM
echo $PATH problem acbenny Linux - General 15 08-12-2004 06:15 PM
audio problem in mic echo derekzxcv Linux - Hardware 0 07-09-2004 07:59 AM
telnet remote echo off problem aanand Linux - Networking 1 01-08-2003 02:52 PM
Echo /devPrinting doesn't work, echo /usb/lp0 works, Testpage works, Printing doesn't Hegemon Linux - General 3 08-15-2002 02:13 PM


All times are GMT -5. The time now is 03:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration