X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Date: Mon, 2 Mar 2009 14:45:41 -0500
From: Christopher Faylor <cgf-use-the-mailinglist-please@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: job control: "set CYGWIN=tty" but ^Z doesn't work
Message-ID: <20090302194541.GB6805@ednor.casa.cgf.cx>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <49AC13A4.5070507@smart.net> <416096c60903021131t6955fb6dme775b9853804e41e@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <416096c60903021131t6955fb6dme775b9853804e41e@mail.gmail.com>
User-Agent: Mutt/1.5.16 (2007-06-09)
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Mon, Mar 02, 2009 at 07:31:54PM +0000, Andy Koppe wrote:
>2009/3/2 Daniel S.:
>>What setup is need to get ^Z to suspend the current process?
>>
>>The CygWin manual Environment Variables section at
>>http://cygwin.com/cygwin-ug-net/setup-env.html says:
>>
>>?The CYGWIN variable is used ...  [Y]ou can ...  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.
>
>You have to make sure that the CYGWIN variable is set before any Cygwin
>programs are run, because it is read when the Cygwin DLL is first
>loaded.  Exiting all Cygwin processes before invoking cygwin.bat again
>should do the trick.

That shouldn't be necessary.  The CYGWIN=tty is inherited by just one
process.  It isn't shared.

>> for (( i = 1 ; i '<' 100000 ; i = i + 1 )) ; do : ; done

Cygwin's CTRL-Z emulation isn't perfect.  It may not work well in a
scenario where you're in a tight loop in user space code which is
what the above bash loop would be.

cgf

--
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/

