aboutsummaryrefslogtreecommitdiff
path: root/runtime/syntax/python.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2026-03-05 10:48:07 +0800
committerGitHub <noreply@github.com>2026-03-05 10:48:07 +0800
commit5048d9aa2ab2f680029688068e3cd0850f388968 (patch)
tree0f927592c45b07717343932cbc417ca700d29d17 /runtime/syntax/python.vim
parent8bfb91accce7a04294f396e8fb2131591b5b1595 (diff)
downloadrneovim-5048d9aa2ab2f680029688068e3cd0850f388968.tar.gz
rneovim-5048d9aa2ab2f680029688068e3cd0850f388968.tar.bz2
rneovim-5048d9aa2ab2f680029688068e3cd0850f388968.zip
fix(tui): call tcdrain() on stdout and stderr on exit (#38154)
Problem: On FreeBSD, output written to TTY may be lost on exit. Example test failure: FAILED test/functional/terminal/tui_spec.lua @ 2521: TUI no assert failure on deadly signal #21896 test/functional/terminal/tui_spec.lua:2523: Row 1 did not match. Expected: |*Nvim: Caught deadly signal 'SIGTERM' | |* | |*[Process exited 1]^ | |* | |* | | | |{5:-- TERMINAL --} | Actual: |* | |*[Process exited 1]{100:^ }| |*{100:~ }| |*{100:~ }| |*{3:[No Name] }| | | |{5:-- TERMINAL --} | To print the expect() call that would assert the current screen state, use screen:snapshot_util(). In case of non-deterministic failures, use screen:redraw_debug() to show all intermediate screen states. Snapshot: screen:expect([[ | [Process exited 1]{100:^ }| {100:~ }|*2 {3:[No Name] }| | {5:-- TERMINAL --} | ]]) stack traceback: test/functional/ui/screen.lua:909: in function '_wait' test/functional/ui/screen.lua:537: in function 'expect' test/functional/terminal/tui_spec.lua:2523: in function <test/functional/terminal/tui_spec.lua:2521> Solution: Call tcdrain() on stdout and stderr on exit. This problem is only observed on FreeBSD, but it probably doesn't hurt to do this on all platforms with termios.h. In fact using tcdrain() on PTY slave is no-op on Linux according to Linux kernel source code.
Diffstat (limited to 'runtime/syntax/python.vim')
0 files changed, 0 insertions, 0 deletions