X-Spam-Check-By: sourceware.org Message-ID: <4545F8C3.FEB84562@dessent.net> Date: Mon, 30 Oct 2006 05:06:11 -0800 From: Brian Dessent X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) MIME-Version: 1.0 To: Fergus Daly CC: cygwin AT cygwin DOT com, fergus AT bonhard DOT uklinux DOT net Subject: Re: Old favourite: Terminate batch job (Y/N)? References: <830404B1D376BA46BC25BE71A3E12873017E5FBD AT corvus DOT tcgp DOT dundee DOT ac DOT uk> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Reply-To: cygwin AT cygwin DOT com Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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. Brian -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/