This is the mail archive of the cygwin 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: Old favourite: Terminate batch job (Y/N)?

Fergus Daly wrote:

> A second solution offered in the archives is
>         .. {as before}
>         set CYGWIN=tty
>         bash
>         .. {as before}
> and this certainly seems to work, in that (a) the invitation to
> "Terminate .." no longer appears; and (b) the preceding {sequence of
> mount instructions} survives in the bash process.
> But several persons offering this solution also provide gloomy but not
> very specific warnings that it is or can be dangerous, causing other
> behaviours to be altered. Again, can anybody comment on this as a
> solution? (It is now months and in some cases years since the original
> postings.)

Well, all this does is tell Cygwin to always allocate a pty, even if
it's possible to use a standard windows console instead.  It is the same
affect as using rxvt or xterm, or running the command over ssh. 
Personally, I always use rxvt and never use the Windows console, so in
effect this is the equivalent of running with 'tty' set, and the world
has not ended.  Many people use CYGWIN=tty as there are some programs
that will only function respectably when connected to a pty; it gives
you a more unix-like environment.

The only thing to watch out for is that because ptys are a Cygwin
fiction, native windows programs can sometimes be confused by them. 
Normally this just means their stdout is buffered and you don't see
anything until the buffer fills.  But if it is expecting interactive
input it can also fail in more strange ways.  I prefer using Cygwin
tools to native ones anyway, so for me this is not a big deal.  You can
search the archives for keywords "pty rxvt console native" etc. and you
should see many, many threads discussing this.

In your specific case, it seems silly to enable this option just to
bypass the batch file prompting (and I'm not even sure why that works)
as it seems like it's an accidental side effect.  I would go with "start
/wait", assuming that the second console window is acceptable.


Unsubscribe info:
Problem reports:

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