Problem: Conpty terminal process may not start. It causes the following tests to fail in Windows conpty:
To be precise, the process is launched, but immediately after it is launched, the input handle to the console is closed with the EOF of the input, and the console is terminated. When the console is terminated, the associated process is also terminated.
Solution: Do not close the input handle at EOF.
In the Windows pseudo console, input and output handles are closed after the process in the console has terminated. This is not explicitly stated in Microsoft's documentation. However, looking at the code for Windows Terminal, which is presented as a complete example of the pseudo console, it is implemented exactly this way.
See the sample codes below:
The handle that is not closed at EOF is closed when Vim detects the end of the job, so there is no risk of them being forgotten and leaking.
ch_anonymous_pipe, which was used to determine whether a channel was for conpty, was set to TRUE only when conpty was being used. The definition also had the comment // ConPTY attached to it. This name is not very appropriate, but I felt it would be rude to add a new field to channel_T just for this purpose, so I reused it.
https://github.com/vim/vim/pull/19025
(2 files)
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
cf.
Complete examples of using the Pseudoconsole are available on our GitHub repository microsoft/terminal in the samples directory.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
thanks
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()