This is the mail archive of the cygwin-developers mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2 0/1] Pseudo console support in PTY (v2)


Hi Corinna,

On Wed, 3 Apr 2019 18:50:29 +0200 Corinna Vinschen wrote:
> I will, but can you please outline the changes between v1 and v2 of your
> patch?  I'd like to understand the code and what the challenges are to
> get this working.

Major changes are as follows.

(1) Pseudo console setup code in pty master is moved into the function
    setup_pseudoconsole().
(2) The code for pushing slave output into pseudo console screen buffer,
    which is for synchronization between real terminal and pseudo console
    screen buffer, is moved into the function push_to_pcon_screenbuffer().
(3) In push_to_pcon_screenbuffer(), add code which attach to pseudo
    console temporally if slave is not attached yet.
(4) Call fhandler_console::need_invisible() in stdio_init() in dtable.cc
    instead of just returning from function when progname is "mintty".
(5) Pushing slave output into pseudo console screen buffer is disabled
    when alternate screen buffer is used.
(6) Change code page to 65001 (UTF-8) at startup of pty slave.
(7) Remove "\033[6n" and "\033[0c", which generate report result in
    console input buffer, in the data to be pushed into pseudo console
    screen buffer.
(8) Add some comments.

(1) and (2) are not essential changes.

(3) fixes the issue:
On Thu,  4 Apr 2019 01:36:20 +0900 Takashi Yano wrote:
> On Sat, 30 Mar 2019 22:08:04 +0900 Takashi Yano wrote:
> > Known problems:
> > * mintty fails to start if it is started in console cygwin
> >   session.
> This has been resolved in the new version.

(3) also makes it unnecessary the code returning from function
stdio_init() in dtable.cc when progname is "mintty".

(4) is for:
On Tue, 2 Apr 2019 13:02:48 +0200 Corinna Vinschen wrote:
> I found another weird effect which I can't explain off the top
> of my head:  system_printf() debug output does not show up
> in a mintty anymore with this patch.  Any idea why?
howver, I am not sure why this solves the issue.

(5) makes vim screen drawing speed up a little.
(6) avoids garbled characters.
(7) avoids the garbage in the input buffer for native console apps
after vim is used.

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]