X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 	tests=AWL,BAYES_00,SPF_PASS
X-Spam-Check-By: sourceware.org
Date: Tue, 23 Jun 2009 17:59:55 +0200
To: "David Karr" <dkarr@real.com>, kbrown@cornell.edu, cygwin@cygwin.com
Subject: Re: How to avoid having shell scripts which fail from killing Emacs  shell?
From: "Matthias Andree" <matthias.andree@gmx.de>
Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-15
MIME-Version: 1.0
References: <41FCBA4373FF4228897280824F4627CF@corp.real.com>  <4A3FDACE.3060402@cornell.edu>  <FB3A080CD486460B81572A5449F34297@corp.real.com>  <4A3FE157.9080901@cornell.edu>  <79EE5DFDC3DC45F2821CD2441A8A63C5@corp.real.com>  <7F307F6AD3334E008D35103D37D60A73@corp.real.com>
Content-Transfer-Encoding: 7bit
Message-ID: <op.uvzip5s21e62zd@balu.cs.uni-paderborn.de>
In-Reply-To: <7F307F6AD3334E008D35103D37D60A73@corp.real.com>
User-Agent: Opera Mail/9.64 (Win32)
X-IsSubscribed: yes
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

Am 23.06.2009, 17:03 Uhr, schrieb David Karr <dkarr@real.com>:

> I just tried changing my script to instead just do a "read" with a  
> prompt.
> This does not kill the shell at the end of the script.  When I do it in
> Java, it kills the shell at the end of the script.  Weird.

Is Java trying anything WRT signalling process groups rather than just  
itself in the belief it were a session leader, i. e. when it tries to  
shoot its threads, it accidentally also shoots down the shell?

Open stdin descriptors can hamper "detaching" processes.

Does the Java stuff you're doing need stdin? If not, try running the JVM  
with input redirection such as <&- (closes stdin, assuming bash or  
similar) or </dev/null.

-- 
Matthias Andree

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

