|
From: | Ken Brown |
Subject: | bug#49524: 28.0.50; make-serial-process is not portable |
Date: | Sun, 11 Jul 2021 11:24:58 -0400 |
User-agent: | Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
https://man7.org/linux/man-pages/man3/termios.3.htmlThis incorrect call of cfsetspeed happens to succeed on GNU/Linux because glibc's cfsetspeed allows the argument to be the numerical baud rate, which it converts to the appropriate Bnnn constant. But I don't think emacs should be relying on this undocumented behavior. In particular, this doesn't work on Cygwin. And it wouldn't even work on GNU/Linux if emacs used the cfsetspeed replacement defined in sysdep.c instead of glibc's cfsetspeed.
I think the way to fix this is to imitate the glibc code that converts the baud rate to a Bnnn constant, but maybe someone has a better idea.
By the way, I came across this issue while investigating the failure of process-tests/fd-setsize-no-crash/make-serial-process on Cygwin.
[Prev in Thread] | Current Thread | [Next in Thread] |