Problem: When opening a conpty terminal, if process startup fails, it will silently exit. As a result, the Test_terminal_shell_option in test_terminal3.vim failed in conpty.
In a winpty terminal, the winpty-provided error message "CreateProcess failed" was displayed. The test is designed to catch this error as an exception.
Solution: Conpty now displays error messages in the same way as winpty.
In addition, since the GetWin32Error() function can obtain more detailed error messages, the format has been changed to "CreateProcess failed: {localized message from the OS}" for conpty.
Also, since the GetWin32Error() function returns errors in ACP (Active Code Page) encoding, these have been converted to Vim's internal encoding, enc. This will prevent messages from being garbled in Japanese environments, etc. The output of this function was basically used by the semsg() function in other places, so this change also fixes potential similar garbled characters.
The test now errors out immediately in places where it is expected not to be reached, and comments have been added about the expected content of the winpty and conpty error messages.
https://github.com/vim/vim/pull/18998
(3 files)
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Example output in Japanese, it says "The system cannot find the file specified".
image.png (view on web)
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
thanks. So we don't have an error message in the terminal itself so that's why the WaitForAsssert call was removed?
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
So we don't have an error message in the terminal itself so that's why the WaitForAsssert call was removed?
Yes, that's right!
On UNIX, the process is launched after fork(), so it is difficult for Vim to detect this directly. The only way to know that the command process failed to start is via an error message in the terminal buffer.
This means that the implementation of process startup failure detection differs significantly between Windows and UNIX.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()