delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/12/03/18:49:25

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <4B184E76.60909@tlinx.org>
Date: Thu, 03 Dec 2009 15:49:10 -0800
From: Linda Walsh <cygwin AT tlinx DOT org>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.8.1.23) Gecko/20090812 Lightning/0.9 Thunderbird/2.0.0.23 ThunderBrowse/3.2.6.8 Mnenhy/0.7.6.666
MIME-Version: 1.0
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Subject: Why does exiting bash window kill off Gvim? (Windows version, but X-would be same question)
X-Stationery: 0.4.10
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

In bash I start a copy of gvim.exe (64-bit windows version) in background.
I disown the job in bash so bash no longer manages the job -- it should be
a free and clear process (unaffected by bash exiting).

Yet when I exit the bash window (bash running in a console window), Gvim
is killed.  Why should bash or the console exiting kill off any processes
running in the background?

It would be the same question of it was the win32-X based Gvim -- it would
be killed as well, but one could argue that cygwin has to shut down all
cygwin processes when it exits -- but I still don't see that as being
necessary.

It's certainly not what happens when I log into a linux workstation and
bring up Gvim displaying locally (an X version, not a Windows
version...:-)).  I can terminate the tty window to a linux box and the X
program just keeps on running (unless I was running it's display through a
copy of SSH that terminates with the window's exit.  I try to avoid that
on my local network.

So why does cygwin have to terminate any processes when I exit the shell
window?  If I've disowned the job, I obviously don't care about any output
-- I could use nohup in front of it, if I wanted to capture such, but it
wouldn't matter, they all seem to be required to die, and I don't
understand why.

I find it ironic to think about the discussion about characters when
something important like jobs running in background normally doesn't even
work right, but I don't understand why it has to be that way.  

I find it *especially* annoying, when it kills off a windows program --
there can be no good reason for that.

I guess I also don't quite get why I don't get back immediate control
when I start gvim under bash.exe, but if I start cmd.exe within bash,
then gvim behaves 'normally' (auto backgrounds and doesn't terminate
when cygwin does).  So it's obvious that there's no reason, at least,
why cygwin should "go out of its way" to kill off any launched
processes.  Or does it not do that?  


linda


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019