получение и установка атрибутов терминала, управление линией, получение и установка скорости передачи данных (get and set terminal attributes, line control, get and set baud rate)
Возвращаемое значение (Return value)
cfgetispeed
() returns the input baud rate stored in the termios
structure.
cfgetospeed
() returns the output baud rate stored in the termios
structure.
All other functions return:
0 on success.
-1 on failure and set errno to indicate the error.
Note that tcsetattr
() returns success if any of the requested
changes could be successfully carried out. Therefore, when
making multiple changes it may be necessary to follow this call
with a further call to tcgetattr
() to check that all changes have
been performed successfully.