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: winpty injection


Hi Thomas,

On Fri, 6 Apr 2018, Thomas Wolff wrote:

> Am 06.04.2018 um 12:31 schrieb Johannes Schindelin:
> >
> > On Fri, 6 Apr 2018, Thomas Wolff wrote:
> >
> > > These symptoms suggest to me: winpty is not the culprit, but its
> > > presence in the invocation chain seems to trigger the effect in a
> > > yet unclear way.
> >
> > Sure, `winpty` is not the culprit.
> >
> Actually, as it turns out, winpty *is* the culprit. I've raised winpty
> issue https://github.com/rprichard/winpty/issues/140 about it.

I am not sure you understand the issue here. The `winpty` helper opens a
Win32 console for the native Windows application to use. Then it polls
this (hidden) console for changes and tries to reflect them in the Cygwin
pty.

If that Windows application writes something to that console containing
Escape sequences, then those Escape sequences occupy certain cells in that
matrix of rows and columns making up that console.

However, if the Windows application uses random-access functions to put
individual characters into cells specified by given absolute positions,
winpty cannot tell the difference. So what winpty would be asked to
consider an ANSI sequence may never have been an ANSI sequence.

Sure, this is a construed example, but it shows that you should not be so
sure that winpty *can* detect ANSI sequences and handle them in a way that
*you* want.

Apart from that, winpty's polling also adds quite a bit of a performance
burden, using more CPU, and lagging in screen updates. Which some users do
not take kindly to.

> > But running certain software (such as Maven) through `winpty` is *not*
> > as unproblematic as we would want.
> >
> > Therefore, it would make sense *not* to make it the default. Unless
> > you have a really good strategy in mind how to communicate this change
> > to users in a way that lets them know about this issue and how to work
> > around it.
>
> Assuming, we're getting winpty tweaked as to the above issue, any further
> concerns?

Just like you seem to have a preference for removing all the structure of
my mails when quoting them by removing all the empty lines, making things
substantially harder to read for me (not to mention uglier to my eyes),
this issue boils down to a matter of personal preferences.

For an individual person, therefore, it would be totally appropriate to
change the default on a whim, according to one person's personal bias.

But not for a widely-used software such as Cygwin.

In the least, therefore, it should be configurable. And I would even argue
that the default behavior should remain the same as current in Cygwin: do
not use winpty by default.

Of course, this is just my opinion, and I am but a user and infrequent
contributor to Cygwin. But I would hope that the Cygwin maintainers use a
lot of care and reluctant deliberation when considering a potentially
disruptive change such as this, a change that may very well occupy a lot
of time in dealing with the unwanted fallout.

Ciao,
Johannes


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