Changes between Version 1 and Version 2 of Ticket #17867, comment 4


Ignore:
Timestamp:
Sep 9, 2022, 10:16:58 PM (21 months ago)
Author:
bipolar

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #17867, comment 4

    v1 v2  
    55That doesn't seems to be the case on Haiku in my tests, and instead of relying on tcdrain() blocking, I have to call `sleep()` with a number of milliseconds proportional to the baudrate I'm using, to make sure the data is properly sent.
    66
    7 Double checking due to your comment, it does indeed like Haiku's tty module takes that TCSBRK and TTYSETBREAK to usb_serial (a no-op there) and to pc_serial drivers (where it seems to set/unset a register, but not block till the output buffer is emptied).
     7Double checking due to your comment, it does indeed looks like Haiku's tty module takes that TCSBRK and TTYSETBREAK to usb_serial (a no-op there) and to pc_serial drivers (where it seems to set/unset a register, but not block till the output buffer is emptied).
    88
    99Maybe I'm wrong in expecting that tcdrain() should behave like on Linux, but in my basic understanding after reading [https://git.haiku-os.org/haiku/tree/src/system/libroot/posix/termios.c#n57 this comment], plus what I could find about TCSBRK online, made me think that BeOS did (and thus Haiku should do?) something like this: