pub fn tcsetattr(
fd: BorrowedFd<'_>,
action: SetAction,
attributes: &Termios,
) -> Result<(), Errno>Expand description
tcsetattr (TCSETS/TCSETSW/TCSETSF) — applique attributes au terminal
fd, à l’instant indiqué par action.
L’action est mappée vers la requête ioctl par un match exhaustif (et
non par l’arithmétique TCSETS + action, fragile car dépendante de la
contiguïté des constantes — audit musl §8) : [SetAction::Now] → TCSETS,
[SetAction::Drain] → TCSETSW, [SetAction::Flush] → TCSETSF.
§Errors
- [
Errno::ENOTTY] :fdn’est pas un terminal. - [
Errno::EBADF] :fdn’est pas un descripteur valide. - [
Errno::EINTR] : interrompu par un signal (remonté tel quel, ADR-021 conv. 2).