delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/02/27/17:53:43

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00
X-Spam-Check-By: sourceware.org
Date: Fri, 26 Feb 2010 15:46:44 +0100 (CET)
Message-Id: <201002261446.o1QEki2k024924@mail.bln1.bf.nsn-intra.net>
From: Thomas Wolff <towo AT towo DOT net>
To: cygwin AT cygwin DOT com
Subject: terminals getting killed on parent's termination
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 general, a GUI application started in the background, like a terminal,
should detach itself from its parent process so that it survives if the 
parent is terminated.
I've noticed the following sometimes surprising inconsistencies about this:

mintty
	xterm &
	mintty &
	exit
	-> all child terminals remain
mintty
	xterm &
	mintty &
	Close/Alt-F4
	-> dialog "Processes are running in session. Exit anyway?"
	OK
	-> xterm remains
	-> mintty is killed
xterm
	xterm &
	mintty &
	exit
	-> all child terminals remain
xterm
	xterm &
	mintty &
	Close/Quit
	-> xterm remains
	-> mintty is killed
cygwin console
	xterm &
	mintty &
	exit/Alt-F4
	-> console hangs
	Close
	-> mintty remains
	-> xterm is killed

I noticed, just as a testcase, that in those cases mintty gets killed 
also setup.exe gets killed.
Also, mintty can be protected from being killed by spawning it with 
(mintty&)
while xterm, spawned this way from a cygwin console, still gets killed.

Puzzled
Thomas

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