Re: Who's using CYGWIN=tty and why?

2011-06-08 Thread Christopher Faylor
On Mon, May 09, 2011 at 06:10:28PM +0200, Corinna Vinschen wrote:
Hi,


Chris and I are wondering how many people are using the Windows console
as local console window in CYGWIN=tty mode and why.

Here's why we ask:

We are both not sure why anybody would use it voluntarily, given that
it's I/O is extremly slow, compared to using a Windows console window in
the default CYGWIN=notty mode or, even better, mintty.  Actually, we
only keep the console tty mode up because it was always there, 14
years or so.

So, if you're using a console in tty mode, why are doing that?  Did you
ever notice that it's much slower?  Did you ever consider to switch to
mintty or any other terminal emulator instead?  If not, why?  Would
anybody really *miss* the CYGWIN=tty mode?  If so, why?  What does this
mode have which isn't covered by notty mode or another terminal
emulator?

Please enlighten us, otherwise we will just rip out this terminal mode
for good.

I've just checked in step 1 of this elimination of CYGWIN=tty. A snapshot
is building now.

cgf

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Who's using CYGWIN=tty and why?

2011-05-11 Thread Corinna Vinschen
On May 10 17:17, Len Giambrone wrote:
 This time with a subject; apologies if the first one gets through.
 
 We use windows native jam which spawns any number of cmd, cygwin, or studio 
 processes.
 If we spawn it from a Cygwin terminal that doesn't have CYGWIN=tty set, we 
 get:

I assume that most people, like me, don't even know what jam is.
Searching for jam on google reminds of needles and haystacks.

 The handle is invalid.
 
 Every time output goes to the screen.
 If we use CYGWIN=tty, we get normal output.

Kind of weird.  The difference is that in tty mode the stdio handles are
pipes, while in the notty case the stdio handles are console handles.
Usually native Windows applications shouldn't see a difference and even
work *better* in notty mode.  Actually, if it works with native Win32
processes in a cmd windows, there's no reason it shouldn't work with
Cygwin processes in a cmd window in notty mode, since the handles are
the same, console handles.

Either there's a function call in jam which doesn't work with console
handles (a native NT call perhaps?) or jam doesn't expect cmd handles if
you start the application differently.  Did you ever try to start the
Cygwin process using cmd /c?


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Who's using CYGWIN=tty and why?

2011-05-11 Thread David Antliff
On Wed, May 11, 2011 at 18:34, Corinna Vinschen wrote:
 On May 10 17:17, Len Giambrone wrote:
 We use windows native jam which spawns any number of cmd, cygwin, or studio 
 processes.
 If we spawn it from a Cygwin terminal that doesn't have CYGWIN=tty set, we 
 get:

 I assume that most people, like me, don't even know what jam is.

At the risk of confusing the issue if I'm mistaken:

jam - Just Another Make

http://www.perforce.com/jam/jam.html

-- David.

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Who's using CYGWIN=tty and why?

2011-05-11 Thread Edward Lam

On 5/11/2011 2:34 AM, Corinna Vinschen wrote:

Kind of weird.  The difference is that in tty mode the stdio handles are
pipes, while in the notty case the stdio handles are console handles.
Usually native Windows applications shouldn't see a difference and even
work *better* in notty mode.


One problem I ran into was with *Windows mode* applications (ie. MS 
link.exe option /SUBSYSTEM:windows) trying to detect stdout redirection. 
I apologize that this takes a bit of explaining first as to why we run 
into a problem with Cygwin.


For Windows-mode applications, _isatty(_fileno(stdout)) will always 
return false. Due to a bug (in Windows and/or the CRT), the FILE *stdout 
object will be initialized to a black hole. So if you want printf's to 
make its way into the redirected file, you have to manually connect the 
FILE *stdout object to the redirected file output handle.


The usual method is to call GetStartupInfo(info) and check if 
info.dwFlags has the STARTF_USESTDHANDLES flag set. If it is set, then 
assume that info.hStdOutput contains the redirected file output handle 
and attach it with something like:

   *stdout = _fdopen(_open_osfhandle(info.hStdOutput, _O_TEXT));

So this brings us to Cygwin. When we spawn such a Windows mode app from 
Cygwin, the method I describe above fails. The call to 
_open_osfhandle(info.hStdOutput, _O_TEXT) returns with an error value of 
-1. This is likely why jam reports the handle is invalid.


Personally, when I first ran into this problem, I never realized that 
CYGWIN=tty would fix it. I did notice that there was a change in the 
behavior between Cygwin B20 and the Cygwin 1.X releases but I only 
realize now that this was probably the reason.


Regards,
-Edward

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Who's using CYGWIN=tty and why?

2011-05-11 Thread Christopher Faylor
On Wed, May 11, 2011 at 11:02:40AM -0400, Edward Lam wrote:
On 5/11/2011 2:34 AM, Corinna Vinschen wrote:
 Kind of weird.  The difference is that in tty mode the stdio handles are
 pipes, while in the notty case the stdio handles are console handles.
 Usually native Windows applications shouldn't see a difference and even
 work *better* in notty mode.

One problem I ran into was with *Windows mode* applications (ie. MS 
link.exe option /SUBSYSTEM:windows) trying to detect stdout redirection. 
I apologize that this takes a bit of explaining first as to why we run 
into a problem with Cygwin.

For Windows-mode applications, _isatty(_fileno(stdout)) will always 
return false. Due to a bug (in Windows and/or the CRT), the FILE *stdout 
object will be initialized to a black hole. So if you want printf's to 
make its way into the redirected file, you have to manually connect the 
FILE *stdout object to the redirected file output handle.

The usual method is to call GetStartupInfo(info) and check if 
info.dwFlags has the STARTF_USESTDHANDLES flag set. If it is set, then 
assume that info.hStdOutput contains the redirected file output handle 
and attach it with something like:
*stdout = _fdopen(_open_osfhandle(info.hStdOutput, _O_TEXT));

So this brings us to Cygwin. When we spawn such a Windows mode app from 
Cygwin, the method I describe above fails. The call to 
_open_osfhandle(info.hStdOutput, _O_TEXT) returns with an error value of 
-1. This is likely why jam reports the handle is invalid.

Personally, when I first ran into this problem, I never realized that 
CYGWIN=tty would fix it. I did notice that there was a change in the 
behavior between Cygwin B20 and the Cygwin 1.X releases but I only 
realize now that this was probably the reason.

Just to go on mean record: I don't think the fact that jam works better
as side effect of setting CYGWIN=tty is a good enough reason to derail
any plans to get rid of CYGWIN=tty.

It seems like you might be able to get the same behavior by saying

jam /dev/null 21 | cat

cgf

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Who's using CYGWIN=tty and why?

2011-05-11 Thread Andy Koppe
On 11 May 2011 16:02, Edward Lam wrote:
 On 5/11/2011 2:34 AM, Corinna Vinschen wrote:

 Kind of weird.  The difference is that in tty mode the stdio handles are
 pipes, while in the notty case the stdio handles are console handles.
 Usually native Windows applications shouldn't see a difference and even
 work *better* in notty mode.

 One problem I ran into was with *Windows mode* applications (ie. MS link.exe
 option /SUBSYSTEM:windows) trying to detect stdout redirection. I apologize
 that this takes a bit of explaining first as to why we run into a problem
 with Cygwin.

 For Windows-mode applications, _isatty(_fileno(stdout)) will always return
 false. Due to a bug (in Windows and/or the CRT), the FILE *stdout object
 will be initialized to a black hole.

That's not a bug, at least not in either Windows or Cygwin. Linking
with /SUBSYSTEM:windows tells Windows that the program doesn't need a
console, so Windows does neither attach it to the console of its
parent process nor create a new console for it. This mean that there's
nowhere for the standard handles to point to.

(With CYGWIN=tty, the standard handles are connected to the pipes
underlying Cygwin's pty implementation, which aren't affected by the
/SUBSYSTEM:windows flag.)

Andy

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Who's using CYGWIN=tty and why?

2011-05-11 Thread Edward Lam

On 5/11/2011 11:02 AM, Edward Lam wrote:

So this brings us to Cygwin. When we spawn such a Windows mode app from
Cygwin, the method I describe above fails. The call to
_open_osfhandle(info.hStdOutput, _O_TEXT) returns with an error value of
-1. This is likely why jam reports the handle is invalid.


PS. It would be interesting to find out why this fails. I would have 
expected that Cygwin/bash would have spawned the child process such that 
the inherited hStdOutput handle was open-able with _open_osfhandle().


-Edward

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Who's using CYGWIN=tty and why?

2011-05-10 Thread Csaba Raduly
On Mon, May 9, 2011 at 6:10 PM, Corinna Vinschen  wrote:
 Hi,


 Chris and I are wondering how many people are using the Windows console
 as local console window in CYGWIN=tty mode and why.

 Here's why we ask:

 We are both not sure why anybody would use it voluntarily, given that
 it's I/O is extremly slow, compared to using a Windows console window in
 the default CYGWIN=notty mode or, even better, mintty.  Actually, we
 only keep the console tty mode up because it was always there, 14
 years or so.

 So, if you're using a console in tty mode, why are doing that?  Did you
 ever notice that it's much slower?  Did you ever consider to switch to
 mintty or any other terminal emulator instead?  If not, why?  Would
 anybody really *miss* the CYGWIN=tty mode?  If so, why?  What does this
 mode have which isn't covered by notty mode or another terminal
 emulator?

Ever since I figured out how to configure rxvt to put the scrollbar on
the right, I haven't used the run bash from cmd.exe console.
Nowadays, for Cygwin I use mintty exclusively.
Sometimes I run C:\cygwin17\bin\grep from the Windows prompt, but
that's not affected by CYGWIN=tty, right?

Anyway, I haven't had the CYGWIN env.var set for years, and never missed it.


 Please enlighten us, otherwise we will just rip out this terminal mode
 for good.

What would that gain ? Would it speed up the rest of the code? Would
the rest of the code become cleaner, easier to understand/maintain?


Csaba
-- 
GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++
The Tao of math: The numbers you can count are not the real numbers.
Life is complex, with real and imaginary parts.
Ok, it boots. Which means it must be bug-free and perfect.  -- Linus Torvalds
People disagree with me. I just ignore them. -- Linus Torvalds

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Who's using CYGWIN=tty and why?

2011-05-10 Thread Corinna Vinschen
On May  9 18:36, Henry S. Thompson wrote:
 Corinna Vinschen writes:
 
  On May  9 17:21, Henry S. Thompson wrote:
  Corinna Vinschen writes:
  
   Chris and I are wondering how many people are using the Windows console
   as local console window in CYGWIN=tty mode and why.
  
  I am one such.
  
   Here's why we ask:
  
   We are both not sure why anybody would use it voluntarily, given that
   it's I/O is extremly slow, compared to using a Windows console window in
   the default CYGWIN=notty mode or, even better, mintty.  Actually, we
   only keep the console tty mode up because it was always there, 14
   years or so.
  
  Um, history is sticky, is I guess the answer.  When I started using
  cygwin (a _long_ time ago), CYGWIN=tty was the recommended setting
  (and isn't it still there in cygwin/cygwin.bat ?).  So I have
 
  No, it's not the default, and it never was, actually.
 
 Well, I guess I misunderstood the earlier version of this prose (from
 [1]):
 
   The CYGWIN variable is used to configure many global settings for
   the Cygwin runtime system. Initially you can leave CYGWIN unset or
   set it to tty (e.g. to support job control with ^Z etc...) using a
   syntax like this in the DOS shell, before launching bash.
 
 plus the prose further up
 
   Some of these settings need to be in effect prior to launching the
   initial Cygwin session (before starting your bash shell, for
   instance). They should therefore be set in the Windows environment
 
 to mean that CYGWIN=tty was recommended.

Well, it was just meant as an example.

  And what do you use to run Cygwin apps?
 
 mintty, of course :-)

Attaboy ;)

  Many native Windows tools don't work well in tty mode anyway.  For
  non-Cygwin tools, the default notty mode is the most compatible one.
 
 OK, I hear that as answers along the lines of yes, and only good
 things to my questions:
 
   Is it time to remove it?  I do use a windows console
   occasionally for pure Windows activities---what change(s) will I see?
 
 The Wayback machine [2] suggests that the prose quoted above hasn't
 changed for nearly 11 years -- perhaps it's due for an update?

Ok, I just did so in CVS.


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Who's using CYGWIN=tty and why?

2011-05-10 Thread Corinna Vinschen
On May 10 10:29, Csaba Raduly wrote:
 On Mon, May 9, 2011 at 6:10 PM, Corinna Vinschen  wrote:
  Hi,
 
 
  Chris and I are wondering how many people are using the Windows console
  as local console window in CYGWIN=tty mode and why.
 
  Here's why we ask:
 
  We are both not sure why anybody would use it voluntarily, given that
  it's I/O is extremly slow, compared to using a Windows console window in
  the default CYGWIN=notty mode or, even better, mintty.  Actually, we
  only keep the console tty mode up because it was always there, 14
  years or so.
 
  So, if you're using a console in tty mode, why are doing that?  Did you
  ever notice that it's much slower?  Did you ever consider to switch to
  mintty or any other terminal emulator instead?  If not, why?  Would
  anybody really *miss* the CYGWIN=tty mode?  If so, why?  What does this
  mode have which isn't covered by notty mode or another terminal
  emulator?
 
 Ever since I figured out how to configure rxvt to put the scrollbar on
 the right, I haven't used the run bash from cmd.exe console.
 Nowadays, for Cygwin I use mintty exclusively.
 Sometimes I run C:\cygwin17\bin\grep from the Windows prompt, but
 that's not affected by CYGWIN=tty, right?

It is affected.  If this setting is in your Windows environment, then
the first Cygwin process in a Cygwin process tree will set up a pseudo
terminal within the console, which in turn adds a layer of pipes between
the application and the console window, rather than just using the
console handles for stdio.

 Anyway, I haven't had the CYGWIN env.var set for years, and never missed it.
 
 
  Please enlighten us, otherwise we will just rip out this terminal mode
  for good.
 
 What would that gain ? Would it speed up the rest of the code? Would
 the rest of the code become cleaner, easier to understand/maintain?

The latter.  After all, the more code and the more conditions you have
to support various settings, the more complicated the code gets and
the more complicated the maintainance gets.


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



RE: Who's using CYGWIN=tty and why?

2011-05-10 Thread Buchbinder, Barry (NIH/NIAID) [E]
Corinna Vinschen sent the following at Monday, May 09, 2011 12:10 PM
Chris and I are wondering how many people are using the Windows console
as local console window in CYGWIN=tty mode and why.

I've been using it for so long that I do not remember why - probably
because I thought it was recommended.

I did some testing yesterday and found that with CYGWIN=tty each
console gets a unique number, as visible in /bin/tty, ps, and
$(cat /proc/$$/ctty).  Without it, one gets con (tty and ps) or a
long, nonunique number (/proc).  I use the tty number to keep track
of console windows.

The above testing was in console where the shortcut launches bash
directly, without use of a batch file.

In the past, I've played with minty and haven't felt the need to
switch.  I did an abbreviated test (just ps) with minty and it had
tty numbers without CYGWIN=tty.  So although I'd like the Windows/DOS
console retain the ability to be tracked, I could switch to minty if
I had to.

Best wishes,

- Barry
  Disclaimer: Statements made herein are not made on behalf of NIAID.


Re: Who's using CYGWIN=tty and why?

2011-05-10 Thread Lee Maschmeyer

Christopher wrote:


Ok, it sounds like there is no need whatsoever to set CYGWIN=tty with
brltty.  That is good news.


According to what Ken wrote, emacs won't work as well. This would be very 
distressing, though I haven't verified it personally.



I'd be pretty surprised if it was the case since if CYGWIN=tty *was*
required then it seems like mintty would work too since the difference
between the ptys that mintty uses and CYGWIN=tty mode is very small.


According to one whole trial it's large enough to convince brltty not to 
deal with the window. This is suggestive but hardly conclusive. I'll try 
again...



Has anyone tried running brltty without setting CYGWIN=tty?


Just now. So far I haven't noticed any problems but this is even less 
significant. I guess notty was meant to say that tty should not be 
mentioned at all in the $CYGWIN variable. I'll remove it and see what 
happens.


--
Lee Maschmeyer
Wayne State University Computing Center
5925 Woodward, #281
Detroit MI 48202
USA 



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Who's using CYGWIN=tty and why?

2011-05-10 Thread Corinna Vinschen
Samuel,

On May  9 22:23, Samuel Thibault wrote:
 Christopher Faylor, le Mon 09 May 2011 16:05:24 -0400, a écrit :
  Has anyone tried running brltty without setting CYGWIN=tty?
 
 I never set the CYGWIN variable nowadays, actually, and brltty works
 fine in that case.

do you happen to know why brltty doesn't work with mintty?  Is there
a chance to make this work?


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Who's using CYGWIN=tty and why?

2011-05-10 Thread Bernhard Ege

On 09-05-2011 18:10, Corinna Vinschen wrote:

Chris and I are wondering how many people are using the Windows console
as local console window in CYGWIN=tty mode and why.


I have, perhaps unnecessarily, tty defined (as well as ntsec).

My typical use of cygwin involves opening a cygwin window using a 
desktop shortcut (link til bat file):


@echo off
C:
chdir C:\cygwin\bin
bash --login -i

I generelly use command line editing a lot (is tty necessary for that?).

My other use is to open a Command window using windows explorer to have 
it change directory to the shown directory (shift-right click-Open 
Command Windows Here). From that windows I type C:\cygwin\bin\bash -l 
to get a cygwin prompt. There I type cd - to get back to the chosen 
directory to perform whatever task I need (mostly grep, find, running 
make, again some command line editing, rarely using an editor).


If tty doesn't make a difference for my use, I have little objection to 
removing it.


Bernhard

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Who's using CYGWIN=tty and why?

2011-05-10 Thread Jeremy Bopp
On 5/10/2011 09:50, Bernhard Ege wrote:
 I generelly use command line editing a lot (is tty necessary for that?).

General command line usage doesn't require the setting.  If in doubt
though, remove the setting and try things out for a bit.  You'll
probably find that nothing changes for your usage, but it's possible you
have a use case no one else considered yet.

 My other use is to open a Command window using windows explorer to have
 it change directory to the shown directory (shift-right click-Open
 Command Windows Here). From that windows I type C:\cygwin\bin\bash -l
 to get a cygwin prompt. There I type cd - to get back to the chosen
 directory to perform whatever task I need (mostly grep, find, running
 make, again some command line editing, rarely using an editor).

You should check out the chere package.  It will allow you to directly
open a Cygwin shell from the context menu rather than jump through the
hoops you're doing here.

-Jeremy

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Who's using CYGWIN=tty and why?

2011-05-10 Thread Andy Koppe
On 10 May 2011 15:08, Corinna Vinschen wrote:
 Samuel,

 On May  9 22:23, Samuel Thibault wrote:
 Christopher Faylor, le Mon 09 May 2011 16:05:24 -0400, a écrit :
  Has anyone tried running brltty without setting CYGWIN=tty?

 I never set the CYGWIN variable nowadays, actually, and brltty works
 fine in that case.

 do you happen to know why brltty doesn't work with mintty?  Is there
 a chance to make this work?

On 9 May 2011 18:40, Lee Maschmeyer wrote:
 BRLTTY is a screen reading system that enables the use of refreshable
 braille devices (see below). It works on Linux and other unixes both in
 console mode and as an adjunct to the Unix GUI screen reader (Orca). It also
 works at the DOS command prompt, and gloriously beautifully in Cygwin. I
 tried mintty once and brltty would not read that window. Whether this can be
 changed by the developers I don't know. I've sporadically tried things like
 rxvt and when they didn't work right off the bat I didn't bother anymore
 since brltty is really splendid.

I've had a quick look at the brltty source and documentation, in
particular the chapter on supported screen drivers at [1]. Brltty
requires access to the full screen buffer of a console or terminal.

The Cygwin and native Windows versions of brltty default to using the
Windows console API to access the screen buffer of console windows.
Mintty, rxvt, and others of course aren't based on Windows consoles,
so that method won't work there. And since there's no documented or
otherwise obvious way for third party programs to implement the
Windows console API, this is a dead end.

However, brltty also has a driver for cooperating with GNU Screen,
which can be enabled with the option '-x sn' . This requires a patch
to Screen though that makes its screen buffers available to brltty via
shared memory. With that, it ought to be possible to make brltty work
with any terminal emulator, plus you'd get the added features of
Screen.

Andy

[1] http://mielke.cc/brltty/doc/Manual-BRLTTY/English/BRLTTY-11.html

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Who's using CYGWIN=tty and why?

2011-05-10 Thread Charles Wilson
On 5/10/2011 9:39 AM, Lee Maschmeyer wrote:
 Just now. So far I haven't noticed any problems but this is even less
 significant. I guess notty was meant to say that tty should not be
 mentioned at all in the $CYGWIN variable. I'll remove it and see what
 happens.

Maybe it's not clear, but most $CYGWIN elements can be prefixed by no
to turn them off.  E.g. acl vs noacl, envcache/noenvcache,
tty/notty, etc.  Now, obviously, these settings ALSO have a default
value -- and usually that value is off, so...in effect,
no[tty,envcache,etc] are no-ops.

--
Chuck


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Who's using CYGWIN=tty and why?

2011-05-10 Thread Lee Maschmeyer
There is no need for CYGWIN=tty as far as my use of brltty is concerned. I 
can still run c:\cygwin\cygwin.bat having taken out the tty from the CYGWIN 
var. If I discover massive emacs malfunctions I can always defect to the vim 
camp. :-)


I'm curious why the tty command in mintty reports /dev/ttyn but that's 
by-the-by and probably belongs in a different thread anyway.


--
Lee Maschmeyer
Wayne State University Computing Center
5925 Woodward, #281
Detroit MI 48202
USA 



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Who's using CYGWIN=tty and why?

2011-05-10 Thread Christopher Faylor
On Tue, May 10, 2011 at 09:37:43AM -0400, Buchbinder, Barry (NIH/NIAID) [E] 
wrote:
Corinna Vinschen sent the following at Monday, May 09, 2011 12:10 PM
Chris and I are wondering how many people are using the Windows console
as local console window in CYGWIN=tty mode and why.

I've been using it for so long that I do not remember why - probably
because I thought it was recommended.

I did some testing yesterday and found that with CYGWIN=tty each
console gets a unique number, as visible in /bin/tty, ps, and
$(cat /proc/$$/ctty).  Without it, one gets con (tty and ps) or a
long, nonunique number (/proc).  I use the tty number to keep track
of console windows.

If we changed the /dev/console to /dev/consN (where N is a unique number
for each console window) would that address your use case?

You would not be able to do something like echo foo /dev/cons4 and have
foo be echoed another console window though.

In the past, I've played with minty and haven't felt the need to
switch.  I did an abbreviated test (just ps) with minty and it had
tty numbers without CYGWIN=tty.

I think Corinna and I both suffered from the misperception that people
were familiar with Cygwin's handling of ttys.  mintty uses ptys.
Cygwin's ttys and ptys are pretty much the same thing.  Cygwin ttys have
some extra handshaking which slows down I/O somewhat wrt ptys.  And,
using CYGWIN=tty means setting up extra threads in the first process
starting in a console window.  So, yes, you'll see /dev/ttyN as the
controlling terminal in a tty application.

It was in a discussion with Corinna where I was contemplating
eliminating the handshaking that Corinna asked the fateful Why do we
need CYGWIN=tty question.  Eliminating the special case of tty handling
would simplify the cygwin pty layer, shrink the size of the DLL, and
generally make Cygwin a little easier to maintain.

cgf

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Who's using CYGWIN=tty and why?

2011-05-10 Thread Christopher Faylor
On Tue, May 10, 2011 at 01:18:47PM -0400, Christopher Faylor wrote:
starting in a console window.  So, yes, you'll see /dev/ttyN as the
controlling terminal in a tty application.
 pty/tty

cgf

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Who's using CYGWIN=tty and why?

2011-05-10 Thread Len Giambrone
This time with a subject; apologies if the first one gets through.

We use windows native jam which spawns any number of cmd, cygwin, or studio 
processes.
If we spawn it from a Cygwin terminal that doesn't have CYGWIN=tty set, we get:

The handle is invalid.

Every time output goes to the screen.
If we use CYGWIN=tty, we get normal output.

The only way I've figured out how to fix this is with CYGWIN=tty.  If there is 
a better way,
please enlighten me.


-Len



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



RE: Who's using CYGWIN=tty and why?

2011-05-10 Thread Buchbinder, Barry (NIH/NIAID) [E]
Christopher Faylor sent the following at Tuesday, May 10, 2011 1:19 PM
If we changed the /dev/console to /dev/consN (where N is a unique number
for each console window) would that address your use case?

Yes, it works for me if there would be a reasonably small (preferably
single digit) number in the output of tty or ps.

You would not be able to do something like echo foo /dev/cons4 and have
foo be echoed another console window though.

Since I haven't been on a real Unix/POSIX machine since the late '80s,
I'd forgotten about that.  Now you made me want to DO it!  :-)

Eliminating the special case of tty handling
would simplify the cygwin pty layer, shrink the size of the DLL, and
generally make Cygwin a little easier to maintain.

Even if you don't accommodate me, that's OK, if your lives will be
easier.  As I wrote, if I find that I really miss tty identification,
I can learn to use mintty.  (Or maybe I should just switch - but not
today.)

Thank to you all for your work on cygwin.

- Barry
  Disclaimer: Statements made herein are not made on behalf of NIAID.

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Who's using CYGWIN=tty and why?

2011-05-10 Thread Christopher Faylor
On Tue, May 10, 2011 at 06:11:35PM -0400, Buchbinder, Barry (NIH/NIAID) [E] 
wrote:
Christopher Faylor sent the following at Tuesday, May 10, 2011 1:19 PM
If we changed the /dev/console to /dev/consN (where N is a unique number
for each console window) would that address your use case?

Yes, it works for me if there would be a reasonably small (preferably
single digit) number in the output of tty or ps.

Yep.  That is the plan.

You would not be able to do something like echo foo /dev/cons4 and have
foo be echoed another console window though.

Since I haven't been on a real Unix/POSIX machine since the late '80s,
I'd forgotten about that.  Now you made me want to DO it!  :-)

Heh.  I knew I shouldn't have mentioned it.

This was actually one of the first things that impressed me about Cygwin
when I first started using it.  Of course, when I first started it only
worked about half the time, but still...

The way I'm implementing this you should be able if /dev/consN is
actually associated with a console but you won't be able to do anything
other than verify existence.

Eliminating the special case of tty handling
would simplify the cygwin pty layer, shrink the size of the DLL, and
generally make Cygwin a little easier to maintain.

Even if you don't accommodate me, that's OK, if your lives will be
easier.  As I wrote, if I find that I really miss tty identification,
I can learn to use mintty.  (Or maybe I should just switch - but not
today.)

I actually have the /dev/conssmall number about 3/4 finished.

If we do decide to get rid of CYGWIN=tty then /dev/cons may become
/dev/ttysmall number again and ptys will become /dev/ptysmall number.

cgf

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Who's using CYGWIN=tty and why?

2011-05-09 Thread Henry S. Thompson
Corinna Vinschen writes:

 Chris and I are wondering how many people are using the Windows console
 as local console window in CYGWIN=tty mode and why.

I am one such.

 Here's why we ask:

 We are both not sure why anybody would use it voluntarily, given that
 it's I/O is extremly slow, compared to using a Windows console window in
 the default CYGWIN=notty mode or, even better, mintty.  Actually, we
 only keep the console tty mode up because it was always there, 14
 years or so.

Um, history is sticky, is I guess the answer.  When I started using
cygwin (a _long_ time ago), CYGWIN=tty was the recommended setting
(and isn't it still there in cygwin/cygwin.bat ?).  So I have
faithfully copied that into my Windows environment initialisation ever
since.  Is it time to remove it?  I do use a windows console
occasionally for pure Windows activities---what change(s) will I see?

ht
-- 
   Henry S. Thompson, School of Informatics, University of Edinburgh
  10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 651-1426, e-mail: h...@inf.ed.ac.uk
   URL: http://www.ltg.ed.ac.uk/~ht/
 [mail from me _always_ has a .sig like this -- mail without it is forged spam]

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Who's using CYGWIN=tty and why?

2011-05-09 Thread Andrew Schulman
 Chris and I are wondering how many people are using the Windows console
 as local console window in CYGWIN=tty mode and why.

/usr/share/doc/screen/README.Cygwin says:

In a DOS console, screen works, but in order to be able to reattach
detached sessions, you must set tty in the CYGWIN environment
variable If you use screen in a DOS console without CYGWIN=tty, you
will be able to detach sessions, but reattaching to them later is likely to
fail.  Then you'll have to use 'screen -wipe' to clear out your old
unusable sessions, and you may have to manually kill their child
processes.

So it seems that screen users who are still using a DOS console need
CYGWIN=tty.  I have no idea how many such people there are.

If CYGWIN=tty is going away, then we could simply tell screen users that
the DOS console is no longer supported in screen, since reattaching there
is likely to fail.

Andrew.


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Who's using CYGWIN=tty and why?

2011-05-09 Thread Corinna Vinschen
On May  9 17:21, Henry S. Thompson wrote:
 Corinna Vinschen writes:
 
  Chris and I are wondering how many people are using the Windows console
  as local console window in CYGWIN=tty mode and why.
 
 I am one such.
 
  Here's why we ask:
 
  We are both not sure why anybody would use it voluntarily, given that
  it's I/O is extremly slow, compared to using a Windows console window in
  the default CYGWIN=notty mode or, even better, mintty.  Actually, we
  only keep the console tty mode up because it was always there, 14
  years or so.
 
 Um, history is sticky, is I guess the answer.  When I started using
 cygwin (a _long_ time ago), CYGWIN=tty was the recommended setting
 (and isn't it still there in cygwin/cygwin.bat ?).  So I have

No, it's not the default, and it never was, actually.

 faithfully copied that into my Windows environment initialisation ever
 since.  Is it time to remove it?  I do use a windows console
 occasionally for pure Windows activities---what change(s) will I see?

I don't quite understand, if you use the Windows console for pure
Windows stuff, why do you use tty mode at all?  And what do you use
to run Cygwin apps?

Many native Windows tools don't work well in tty mode anyway.  For
non-Cygwin tools, the default notty mode is the most compatible one.


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Who's using CYGWIN=tty and why?

2011-05-09 Thread Edward Lam

On 5/9/2011 12:10 PM, Corinna Vinschen wrote:

Chris and I are wondering how many people are using the Windows console
as local console window in CYGWIN=tty mode and why.


I'm not but there's various references to it it the web about it being 
requires for Emacs. eg. 
http://blog.arithm.com/2007/12/01/killing-cygwin-emacs/ I hope that 
these references are outdated with Cygwin 1.7?


The other references to it I see are about requiring tty mode for sshd. 
This is also for historical reasons but I'm not sure if we still need it 
in Cygwin 1.7.


-Edward

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Who's using CYGWIN=tty and why?

2011-05-09 Thread Ken Brown

On 5/9/2011 12:39 PM, Edward Lam wrote:

On 5/9/2011 12:10 PM, Corinna Vinschen wrote:

Chris and I are wondering how many people are using the Windows console
as local console window in CYGWIN=tty mode and why.


I'm not but there's various references to it it the web about it being
requires for Emacs. eg.
http://blog.arithm.com/2007/12/01/killing-cygwin-emacs/ I hope that
these references are outdated with Cygwin 1.7?


This is still the case: emacs does not work well in the console unless 
CYGWIN=tty is set.  But I don't see this as a reason to keep the 
CYGWIN=tty mode for the console.  I see it as a reason for emacs users 
to use a different terminal emulator, such as mintty.


Ken

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Who's using CYGWIN=tty and why?

2011-05-09 Thread Henry S. Thompson
Corinna Vinschen writes:

 On May  9 17:21, Henry S. Thompson wrote:
 Corinna Vinschen writes:
 
  Chris and I are wondering how many people are using the Windows console
  as local console window in CYGWIN=tty mode and why.
 
 I am one such.
 
  Here's why we ask:
 
  We are both not sure why anybody would use it voluntarily, given that
  it's I/O is extremly slow, compared to using a Windows console window in
  the default CYGWIN=notty mode or, even better, mintty.  Actually, we
  only keep the console tty mode up because it was always there, 14
  years or so.
 
 Um, history is sticky, is I guess the answer.  When I started using
 cygwin (a _long_ time ago), CYGWIN=tty was the recommended setting
 (and isn't it still there in cygwin/cygwin.bat ?).  So I have

 No, it's not the default, and it never was, actually.

Well, I guess I misunderstood the earlier version of this prose (from
[1]):

  The CYGWIN variable is used to configure many global settings for
  the Cygwin runtime system. Initially you can leave CYGWIN unset or
  set it to tty (e.g. to support job control with ^Z etc...) using a
  syntax like this in the DOS shell, before launching bash.

plus the prose further up

  Some of these settings need to be in effect prior to launching the
  initial Cygwin session (before starting your bash shell, for
  instance). They should therefore be set in the Windows environment

to mean that CYGWIN=tty was recommended.  I followed what I understood
that recommendation to be at the time, and have faithfully copied that
into my Windows environment initialisation ever since.

 I don't quite understand, if you use the Windows console for pure
 Windows stuff, why do you use tty mode at all?

Because I thought that having job control might be useful, and so I
followed the recommendation above. . .  I clearly didn't understand,
at the time, that the console as such, vs. the console running bash
as from cygwin.bat, were not the same thing.

 And what do you use to run Cygwin apps?

mintty, of course :-)

 Many native Windows tools don't work well in tty mode anyway.  For
 non-Cygwin tools, the default notty mode is the most compatible one.

OK, I hear that as answers along the lines of yes, and only good
things to my questions:

  Is it time to remove it?  I do use a windows console
  occasionally for pure Windows activities---what change(s) will I see?

The Wayback machine [2] suggests that the prose quoted above hasn't
changed for nearly 11 years -- perhaps it's due for an update?

ht

[1] http://cygwin.com/cygwin-ug-net/setup-env.html
[2] 
http://replay.web.archive.org/2829065425/http://sources.redhat.com/cygwin/cygwin-ug-net/setup-env.html
-- 
   Henry S. Thompson, School of Informatics, University of Edinburgh
  10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 651-1426, e-mail: h...@inf.ed.ac.uk
   URL: http://www.ltg.ed.ac.uk/~ht/
 [mail from me _always_ has a .sig like this -- mail without it is forged spam]

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Who's using CYGWIN=tty and why?

2011-05-09 Thread Lee Maschmeyer

Hi all,

At the risk of exciting the contempt avalanche all too pervasive in this 
list (never at any time by Corinna--THANKS):


I'm not sure I understand the difference between the DOS console and the 
Windows console. And, truth to tell, I've been around here for a good long 
time and never heard of CYGWIN=notty. However:


BRLTTY is a screen reading system that enables the use of refreshable 
braille devices (see below). It works on Linux and other unixes both in 
console mode and as an adjunct to the Unix GUI screen reader (Orca). It also 
works at the DOS command prompt, and gloriously beautifully in Cygwin. I 
tried mintty once and brltty would not read that window. Whether this can be 
changed by the developers I don't know. I've sporadically tried things like 
rxvt and when they didn't work right off the bat I didn't bother anymore 
since brltty is really splendid. For what it's worth, here's my cygwin.bat. 
Exactly how much of it is necessary and what the costs of what changes might 
be I don't know:


@echo off

c:
chdir c:\cygwin\bin
set HOME=c:\cygwin\home\me
set LANG=en_US.UTF-8
set CYGWIN=tty notitle glob
bash --login -i

The rest of this message is for the merely curious:

What's a refreshable braille device: It's a box that has a smooth wire 
screen on the top. There are pins below the holes in this wire screen. The 
pins can be pushed up through the holes (these are dots) or pulled down 
below them (these are non-dots). These pins are in eight rows corresponding 
to the eight rows of dots in a braille cell (eight on the computer, six for 
standard paper braille). There are from 18 to 84 of these 8-dot cells across 
the length of the wire screen, and there are buttons on the braille device 
to move this 18-to-84 character window around on the screen.


What's splendid about brltty in Cygwin? Other Windows screen readers have 
braille, but frequently it skips blank lines for reasons I don't begin to 
comprehend. Brltty doesn't skip them. So it's much easier to tell the screen 
layout in brltty than with the braille from a Windows screen reader. Brltty 
is also more responsive and more accurate (it doesn't spuriously underline 
letters, one of the problems with braille in other screen readers). While 
the Windows screen reader I use (JAWS) can see the Cygwin text, not all can. 
Narrator is a part of the Windows OS; it's on every Windows computer. It 
can't see the text in Cygwin at all.


I've included the brltty developers on this message and will send them 
Corinna's original so you may hear from somebody who knows what they're 
talking about. :-)


Castigation, Mastication and Denigration cheerfully accepted,

--
Lee Maschmeyer
Wayne State University Computing Center
5925 Woodward, #281
Detroit MI 48202
USA 



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Who's using CYGWIN=tty and why?

2011-05-09 Thread Samuel Thibault
Lee Maschmeyer, le Mon 09 May 2011 13:40:57 -0400, a écrit :
 And, truth to tell, I've been around here for a good long time and
 never heard of CYGWIN=notty.

As I understand it, notty is already the default, so unless you have an
explicit CYGWIN=tty, it's already notty.

brltty does not touch at the cygwin tty layer. It just uses
native win32 interfaces to access the consoles (AttachConsole,
ReadConsoleOutputCharacterW) and simulate keypresses
(WriteConsoleInputW), consoles need to be windows console, but that's
all.

Samuel

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Who's using CYGWIN=tty and why?

2011-05-09 Thread Christopher Faylor
On Mon, May 09, 2011 at 12:39:47PM -0400, Edward Lam wrote:
On 5/9/2011 12:10 PM, Corinna Vinschen wrote:
 Chris and I are wondering how many people are using the Windows console
 as local console window in CYGWIN=tty mode and why.

I'm not but there's various references to it it the web about it being 
requires for Emacs. eg. 
http://blog.arithm.com/2007/12/01/killing-cygwin-emacs/ I hope that 
these references are outdated with Cygwin 1.7?

The other references to it I see are about requiring tty mode for sshd. 
This is also for historical reasons but I'm not sure if we still need it 
in Cygwin 1.7.

We have never needed tty mode for sshd.  There is a web site which
suggests (suggested?) it but it is mistaken.

cgf

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Who's using CYGWIN=tty and why?

2011-05-09 Thread Christopher Faylor
On Mon, May 09, 2011 at 07:52:05PM +0200, Samuel Thibault wrote:
Lee Maschmeyer, le Mon 09 May 2011 13:40:57 -0400, a ?crit :
 And, truth to tell, I've been around here for a good long time and
 never heard of CYGWIN=notty.

As I understand it, notty is already the default, so unless you have an
explicit CYGWIN=tty, it's already notty.

Yes, that's what Corinna meant by default CYGWIN=notty.

brltty does not touch at the cygwin tty layer. It just uses
native win32 interfaces to access the consoles (AttachConsole,
ReadConsoleOutputCharacterW) and simulate keypresses
(WriteConsoleInputW), consoles need to be windows console, but that's
all.

Ok, it sounds like there is no need whatsoever to set CYGWIN=tty with
brltty.  That is good news.

I'd be pretty surprised if it was the case since if CYGWIN=tty *was*
required then it seems like mintty would work too since the difference
between the ptys that mintty uses and CYGWIN=tty mode is very small.

Has anyone tried running brltty without setting CYGWIN=tty?

cgf

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Who's using CYGWIN=tty and why?

2011-05-09 Thread Christopher Faylor
On Mon, May 09, 2011 at 04:00:25PM -0400, Christopher Faylor wrote:
On Mon, May 09, 2011 at 12:39:47PM -0400, Edward Lam wrote:
On 5/9/2011 12:10 PM, Corinna Vinschen wrote:
 Chris and I are wondering how many people are using the Windows console
 as local console window in CYGWIN=tty mode and why.

I'm not but there's various references to it it the web about it being 
requires for Emacs. eg. 
http://blog.arithm.com/2007/12/01/killing-cygwin-emacs/ I hope that 
these references are outdated with Cygwin 1.7?

The other references to it I see are about requiring tty mode for sshd. 
This is also for historical reasons but I'm not sure if we still need it 
in Cygwin 1.7.

We have never needed tty mode for sshd.  There is a web site which
suggests (suggested?) it but it is mistaken.
   (was?)

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Who's using CYGWIN=tty and why?

2011-05-09 Thread Samuel Thibault
Christopher Faylor, le Mon 09 May 2011 16:05:24 -0400, a écrit :
 Has anyone tried running brltty without setting CYGWIN=tty?

I never set the CYGWIN variable nowadays, actually, and brltty works
fine in that case.

Samuel

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



RE: Who's using CYGWIN=tty and why?

2011-05-09 Thread Karl M

 Date: Mon, 9 May 2011 18:10:28 +0200
 From: corinna
 Subject: Who's using CYGWIN=tty and why?

 Hi,

 Chris and I are wondering how many people are using the Windows console
 as local console window in CYGWIN=tty mode and why.

 Here's why we ask:

 We are both not sure why anybody would use it voluntarily, given that
 it's I/O is extremly slow, compared to using a Windows console window in
 the default CYGWIN=notty mode or, even better, mintty. Actually, we
 only keep the console tty mode up because it was always there, 14
 years or so.

 So, if you're using a console in tty mode, why are doing that? Did you
 ever notice that it's much slower? Did you ever consider to switch to
 mintty or any other terminal emulator instead? If not, why? Would
 anybody really *miss* the CYGWIN=tty mode? If so, why? What does this
 mode have which isn't covered by notty mode or another terminal
 emulator?

 Please enlighten us, otherwise we will just rip out this terminal mode
 for good.

I use CYGWIN=tty, and have used it forever. Back in the dark ages, I recall
that there were reasons that I chose it...control character handling or
formatting? It made something I cared about work properly and four M$ operating
systems later...
 
I did try rxvt and didn't like the way it looked, so I stayed with a console
window and CYGWIN=tty.
 
Thanks,
 
...Karl   

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Who's using CYGWIN=tty and why?

2011-05-09 Thread Jeremy Bopp
On 5/9/2011 16:14, Karl M wrote:
 I did try rxvt and didn't like the way it looked, so I stayed with a console
 window and CYGWIN=tty.

Hi, Karl.  Have you tried mintty yet?  If looks are what turned you away
from rxvt, I think you'll like mintty much more.

-Jeremy

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Who's using CYGWIN=tty and why?

2011-05-09 Thread Thomas Wolff

Am 09.05.2011 18:10, schrieb Corinna Vinschen:

Hi,


Chris and I are wondering how many people are using the Windows console
as local console window in CYGWIN=tty mode and why.

Here's why we ask:

We are both not sure why anybody would use it voluntarily, given that
it's I/O is extremly slow, compared to using a Windows console window in
the default CYGWIN=notty mode or, even better, mintty.  Actually, we
only keep the console tty mode up because it was always there, 14
years or so.

So, if you're using a console in tty mode, why are doing that?  Did you
ever notice that it's much slower?  Did you ever consider to switch to
mintty or any other terminal emulator instead?  If not, why?  Would
anybody really *miss* the CYGWIN=tty mode?  If so, why?  What does this
mode have which isn't covered by notty mode or another terminal
emulator?
I don't use it but there is one difference that I actually reported 
years ago:

http://sourceware.org/bugzilla/show_bug.cgi?id=513
and I mentioned it again in
http://cygwin.com/ml/cygwin-patches/2009-q4/msg00144.html
and
http://cygwin.com/ml/cygwin-patches/2009-q4/msg00155.html
- later I tried to debug again and saw that with CYGWIN=tty, one 
fhandler_console object drives console I/O whereas with CYGWIN=notty 3 
objects are created (for stdin, stdout, stderr). This is the reason for 
the cursor position response code getting lost because it is pushed into 
the wrong fhandler_console object. I tried to patch it but it got all 
messed up so I didn't post anything then.

__
Thomas

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Who's using CYGWIN=tty and why?

2011-05-09 Thread Christopher Faylor
On Tue, May 10, 2011 at 12:27:08AM +0200, Thomas Wolff wrote:
Am 09.05.2011 18:10, schrieb Corinna Vinschen:
Chris and I are wondering how many people are using the Windows console
as local console window in CYGWIN=tty mode and why.

Here's why we ask:

We are both not sure why anybody would use it voluntarily, given that
it's I/O is extremly slow, compared to using a Windows console window
in the default CYGWIN=notty mode or, even better, mintty.  Actually, we
only keep the console tty mode up because it was always there, 14
years or so.

So, if you're using a console in tty mode, why are doing that?  Did you
ever notice that it's much slower?  Did you ever consider to switch to
mintty or any other terminal emulator instead?  If not, why?  Would
anybody really *miss* the CYGWIN=tty mode?  If so, why?  What does this
mode have which isn't covered by notty mode or another terminal
emulator?

I don't use it but there is one difference that I actually reported
years ago: http://sourceware.org/bugzilla/show_bug.cgi?id=513 and I
mentioned it again in
http://cygwin.com/ml/cygwin-patches/2009-q4/msg00144.html and
http://cygwin.com/ml/cygwin-patches/2009-q4/msg00155.html - later I
tried to debug again and saw that with CYGWIN=tty, one fhandler_console
object drives console I/O whereas with CYGWIN=notty 3 objects are
created (for stdin, stdout, stderr).  This is the reason for the cursor
position response code getting lost because it is pushed into the wrong
fhandler_console object.  I tried to patch it but it got all messed up
so I didn't post anything then.

We will certainly be willing to fix problems as they occur.  I don't
think that erroneous cursor reporting is a show stopper.

cgf

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Who's using CYGWIN=tty and why?

2011-05-09 Thread rifter rifter
On 5/9/11, Corinna Vinschen wrote:
 On May  9 17:21, Henry S. Thompson wrote:
 Corinna Vinschen writes:

  Chris and I are wondering how many people are using the Windows console
  as local console window in CYGWIN=tty mode and why.

 I am one such.

  Here's why we ask:
 
  We are both not sure why anybody would use it voluntarily, given that
  it's I/O is extremly slow, compared to using a Windows console window in
  the default CYGWIN=notty mode or, even better, mintty.  Actually, we
  only keep the console tty mode up because it was always there, 14
  years or so.

 Um, history is sticky, is I guess the answer.  When I started using
 cygwin (a _long_ time ago), CYGWIN=tty was the recommended setting
 (and isn't it still there in cygwin/cygwin.bat ?).  So I have

 No, it's not the default, and it never was, actually.

 faithfully copied that into my Windows environment initialisation ever
 since.  Is it time to remove it?  I do use a windows console
 occasionally for pure Windows activities---what change(s) will I see?

 I don't quite understand, if you use the Windows console for pure
 Windows stuff, why do you use tty mode at all?  And what do you use
 to run Cygwin apps?


You do realize cygwin apps run just fine from the regular windows
console, right? You can even invoke your favorite shell to run
scripts.  So if you were trying to run native windows console tools
while using cygwin tools as well, this might be something you would do
(for instance running a batch file or sysinternals tool or something
similar and using some cygwin tool like grep).  I can't speak to the
cygwin=tty thing though.

 Many native Windows tools don't work well in tty mode anyway.  For
 non-Cygwin tools, the default notty mode is the most compatible one.


 Corinna

 --
 Corinna Vinschen  Please, send mails regarding Cygwin to
 Cygwin Project Co-Leader  cygwin AT cygwin DOT com
 Red Hat

 --
 Problem reports:   http://cygwin.com/problems.html
 FAQ:   http://cygwin.com/faq/
 Documentation: http://cygwin.com/docs.html
 Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Who's using CYGWIN=tty and why?

2011-05-09 Thread Claude Sylvain


On 09/05/2011 12:10, Corinna Vinschen wrote:


 Chris and I are wondering how many people are using the Windows console
 as local console window in CYGWIN=tty mode and why.


- I am not a Cygwin Power User, and I am not sure to understand
  you well.

- If you talk about the console that is launched when double
  clicking on the Cygwin shortcut (C:\cygwin\Cygwin.bat);
  then, I can say that I use it every day, without any modification.
  This make the job well for me, because most of the time I
  am working the old way, editing notes, scripts and code
  with VIM; compiling code using Makefile and make; etc.

- Since I never tried the other consoles, I can not say more
  about that subject.


Regards,

Claude



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple