Bug report
test_termios.test_tcflow hangs on DragonFly BSD. It is not tcflow() itself which hangs, but closing the pseudo-terminal in the cleanup:
Timeout (0:02:00)!
Thread 0x0000000800af30c0 (most recent call first):
File "Lib/unittest/case.py", line 654 in _callCleanup
File "Lib/unittest/case.py", line 728 in doCleanups
TCIOFF and TCION transmit STOP and START characters, and nothing reads them from the master side, so closing the slave waits for the output to drain forever. Which action is used matters:
| action |
DragonFly BSD |
Linux |
TCOOFF, TCOON |
close returns |
close returns |
TCIOFF |
close blocks |
close returns |
TCION |
close blocks |
close returns |
Reading the master before closing shows the two characters and unblocks the close:
Discarding them with tcflush(fd, TCOFLUSH) after the tcflow() calls fixes the hang. test_termios then takes 44 ms instead of timing out.
Linked PRs
Bug report
test_termios.test_tcflowhangs on DragonFly BSD. It is nottcflow()itself which hangs, but closing the pseudo-terminal in the cleanup:TCIOFFandTCIONtransmit STOP and START characters, and nothing reads them from the master side, so closing the slave waits for the output to drain forever. Which action is used matters:TCOOFF,TCOONTCIOFFTCIONReading the master before closing shows the two characters and unblocks the close:
Discarding them with
tcflush(fd, TCOFLUSH)after thetcflow()calls fixes the hang.test_termiosthen takes 44 ms instead of timing out.Linked PRs