tcgetattr函数,用来获取终端参数,成功返回零;失败则返回非零,发生失败接口将设置errno标识。
头文件
include <termios.h>
函数原型
int tcgetattr(int fd, struct termios *termios_p);
参数fd为终端的文件描述符,返回的结果保存在termios 结构体中
tcgetattr函数,用来获取终端参数,成功返回零;失败则返回非零,发生失败接口将设置errno标识。
include <termios.h>
int tcgetattr(int fd, struct termios *termios_p);
参数fd为终端的文件描述符,返回的结果保存在termios 结构体中