The POSIX "termios" structures are at the center of serial-port I/O control, and there are many knobs and switches to turn here. The stty program is actually a command-line wrapper around the termios struct, and it should be apparent that this whole arena is filled with arcana, obscura, historical artifacts, and even nostalgia. EXAMPLE The following example illustrates the use of tcgetattr to determine the terminal attributes for stdout: ... cfgetispeed, cfgetospeed, tcsetattr.
However, calls that have already committed are not restarted, but instead return a partial success (for example, a short read count). After a fork(2) or vfork(2) , all signals, the signal mask, the signal stack, and the restart/interrupt flags are inherited by the child.