#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <termio.h>
int getPasswd(char *passwd)
{
struct termio tbuf_old,tbuf;
ioctl(0, TCGETA, &tbuf_old);
ioctl(0, TCGETA, &tbuf);
tbuf.c_lflag &=~ECHO;
if (ioctl(0, TCSETAF, &tbuf) != 0)
return; ......
阅读全文