Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
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
Message-ID: <40D2EDB6.4000307@etr-usa.com>
Date: Fri, 18 Jun 2004 07:27:18 -0600
From: Warren Young <warren@etr-usa.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040616
MIME-Version: 1.0
To: Cygwin-L <cygwin@cygwin.com>
Subject: Re: Ctrl-Z fails to suspend Windows programs
References: <87ekogc0uq.fsf@eu.citrix.com><Pine.LNX.4.58.0406171259170.30937@ming.fruitbat.org><h4o4z9lf4esc$.dlg@thorstenkampe.de> <87vfhptdqu.fsf@eu.citrix.com>
In-Reply-To: <87vfhptdqu.fsf@eu.citrix.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes

John Cooper wrote:
> 
> The problem is that I often don't want to have to terminate the GUI app just to
> get my shell prompt back.

Well now, that's an entirely different deal.

Somehow, cmd.exe detects that a program is GUI-only, and it gives you 
your prompt back when the program has launched.  I suspect it would be 
better to find out how cmd.exe manages that trick than to put Ctrl-Z 
support into Cygwin that will likely break some non-Cygwin programs.

One way to do this would be for Cygwin's exec() to look at the PE header 
for the program and see if it has the console mode flag set.  If not, it 
could do whatever the Cygwin 'run' program does to spin the program off, 
detached from the shell.

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

