# include <termios.h>

 
  • tcsetattr
    • int tcsetattr(int fd, int optional_actions, const struct termios *termios_p); 터미널 상태를 설정한다. fd : 터미널 file discriptor optional_actions : 동작 선택 TCSNOW → 속성을 바로 변경한다. TCSADRAIN → 송신을 완료한 후 변경한다. TCSAFLUSH → 송수신 완료 후 변경한다. termios_p : 터미널 속성을 저장할 포인터 (RETURN) 성공 : 0 실패 : -1 && errno 설정
  • tcgetattr
    • int tcgetattr(int fd, struct termios *termios_p); 터미널 파일에 대한 속성을 얻어서 termios_p에 저장한다. fd : 터미널 file discriptor termios_p : 터미널 속성을 저장할 포인터 (RETURN) 성공 : 0 실패 : -1 && errno 설정