[Boost-bugs] [Boost C++ Libraries] #4559: Need baud rate workaround in asio for bug in glibc

Subject: [Boost-bugs] [Boost C++ Libraries] #4559: Need baud rate workaround in asio for bug in glibc
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-08-17 22:47:18


#4559: Need baud rate workaround in asio for bug in glibc
-----------------------------------------------+----------------------------
 Reporter: Steve Soule <sts11dbxr@…> | Owner: chris_kohlhoff
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: asio
  Version: Boost 1.44.0 | Severity: Problem
 Keywords: |
-----------------------------------------------+----------------------------
 In glibc 2.12.1 (the current version), and all previous versions, there
 are bugs in the Linux implementations of the tcsetattr and tcgetattr
 functions so that the c_ispeed and c_ospeed fields of the termios data
 structure are not correctly passed to and from the kernel. More
 specifically, the implementations of these functions use ioctl commands
 TCSETS and TCGETS when they should use TCSETS2 and TCGETS2 (for Linux).
 Because of this, it is currently not possible to set/get an arbitrary baud
 rate on Linux through the tcsetattr and tcgetattr library functions.
 Because Boost asio currently uses tcsetattr and tcgetattr, its baud rate
 setting functions can not currently handle anything but the standard Posix
 baud rates. To work around this bug in glibc (which was reported a long
 time ago and never fixed), I think asio should call ioctl directly on
 Linux rather than using tcgetattr and tcsetattr (in the file
 boost/asio/detail/impl/reactive_serial_port_service.ipp). I consider this
 a bug in asio because whether or not it is ever fixed in glibc, old
 versions of glibc that have the bug will continue to be used for years to
 come. I feel that Boost should work around bugs in individual operating
 systems whenever it is trivial to do so (which it is in this case).

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4559>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:04 UTC