Skip to content
This repository was archived by the owner on Sep 29, 2025. It is now read-only.

Commit 258e4af

Browse files
authored
Merge pull request #1804 from reicast/skmp/fix-pty-echo
Serial/PTY: Disable echo loopback
2 parents 40444ef + f13bce8 commit 258e4af

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

libswirl/linux-dist/main.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,12 @@ int main(int argc, wchar* argv[])
464464
pty_master = -1;
465465
if (openpty(&pty_master, &slave, slave_name, nullptr, nullptr) >= 0)
466466
{
467+
// Turn ECHO off, we don't want to loop-back
468+
struct termios tp;
469+
tcgetattr(pty_master, &tp);
470+
tp.c_lflag &= ~ECHO;
471+
tcsetattr(pty_master, TCSAFLUSH, &tp);
472+
467473
printf("Serial: Created virtual serial port at %s\n", slave_name);
468474

469475
if (settings.debug.VirtualSerialPortFile.size())

0 commit comments

Comments
 (0)