1
0
Fork 0
mirror of https://repo.or.cz/socat.git synced 2025-07-12 22:53:24 +00:00

Fixed restore of STDIO tty on Solaris

This commit is contained in:
Gerhard Rieger 2023-02-25 15:40:09 +01:00
parent 5fdd033e7d
commit d355da98bc
4 changed files with 83 additions and 6 deletions

View file

@ -164,7 +164,7 @@ int xioshutdown(xiofile_t *sock, int how) {
}
#if WITH_TERMIOS
if (sock->stream.ttyvalid) {
if (Tcsetattr(sock->stream.fd, 0, &sock->stream.savetty) < 0) {
if (Tcsetattr(sock->stream.fd, TCSAFLUSH, &sock->stream.savetty) < 0) {
Warn2("cannot restore terminal settings on fd %d: %s",
sock->stream.fd, strerror(errno));
}