18.4. Getting and Setting Terminal Attributes[View full width]#include <termios.h> int tcgetattr(int filedes , struct termios *termptr ); int tcsetattr(int filedes , int opt , const struct ![]() |
Both return: 0 if OK, 1 on error |
TCSANOW | The change occurs immediately. |
TCSADRAIN | The change occurs after all output has been transmitted. This option should be used if we are changing the output parameters. |
TCSAFLUSH | The change occurs after all output has been transmitted. Furthermore, when the change takes place, all input data that has not been read is discarded (flushed). |