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 To: cygwin AT cygwin DOT com Subject: Re: Ctrl-Z fails to suspend Windows programs References: <87ekogc0uq DOT fsf AT eu DOT citrix DOT com> From: John Cooper Date: Fri, 18 Jun 2004 10:30:17 +0100 In-Reply-To: (Thorsten Kampe's messageof "Thu, 17 Jun 2004 23:31:10 +0200") Message-ID: <87vfhptdqu.fsf@eu.citrix.com> User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-imss-version: 2.5 X-imss-result: Passed X-imss-scores: Clean:99.90000 C:15 M:2 S:5 R:5 X-imss-settings: Baseline:4 C:4 M:4 S:4 R:1 (1.0000 1.0000) X-IsSubscribed: yes Thorsten Kampe writes: > Why should Cygwin zsh have such a feature and make a difference > between a GUI and a non GUI application? Two reasons: 1) Most native Windows apps don't read from or write to the invoking shell window - it doesn't add much value to run them in the "foreground". 2) Once started (in the foreground) it's not possible to suspend such a program. > When you invoke a non GUI application, you won't return to the prompt unless > the application has finished. Same with zsh under Linux. If you start a GUI > without a "&" you don't get a prompt. Yes, but the key difference is that on Linux you can always get back to the shell window by suspending the GUI app with ^Z (or whatever is your susp char). > And you still can [Ctrl]+[C] the GUI app which you couldn't when it was run > in the background. The problem is that I often don't want to have to terminate the GUI app just to get my shell prompt back. --- John > * Peter A. Castro (2004-06-17 22:13 +0100) > > On Tue, 15 Jun 2004, John Cooper wrote: > >> > The point is that it's not about cygwin-vs-windoze apps. It's about > >> > apps-that-use-console-stdin-and-stdout vs. apps-that-display-a-gui; those > >> > that show a gui could usefully be detached, but those that read their input > >> > from stdin will break if the shell detaches them. > > > > Hi John, > > I'm the maintainer for zsh on Cygwin. > > > >> Yes, you're right, the old "native" zsh option was specifically to do with GUI > >> apps rather than "Windows" apps per se - here's the doc to for enabling the > >> option (it was off by default): > >> > >> winntwaitforguiapps: When set, makes the shell wait for win32 GUI apps to > >> terminate instead of spawning them asynchronously. > >> > >> > I don't think there's a reliable enough mechanism by which a shell could > >> > detect one case from the other. > >> > >> Below is the code it used to determine if a program is a GUI program or not. I > >> don't know how well it works under all conditions; however it did work fine for > >> me. > >> > >> Even if not perfectly reliable, could something like this be added but disabled > >> by default? I for one would find it useful. > > > > I guess I don't really have much of a problem with adding such a feature, > > provided it's something that many users really want. I can see some > > merit to it, but is it really that much work to type '&' after the > > command to run it in the background? > > > Thorsten -- 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/