delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/11/08/10:59:02

X-Spam-Check-By: sourceware.org
Date: Wed, 8 Nov 2006 10:58:45 -0500
From: Christopher Faylor <cgf-no-personal-reply-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: cygwin Digest 28 Oct 2006 14:33:34 -0000 Issue 5237
Message-ID: <20061108155845.GC16477@trixie.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <1162046014 DOT 3618 DOT ezmlm AT cygwin DOT com> <e4d6a34d0610291716h5dd01081g980ee946127c3707 AT mail DOT gmail DOT com> <loom DOT 20061107T013138-661 AT post DOT gmane DOT org>
Mime-Version: 1.0
In-Reply-To: <loom.20061107T013138-661@post.gmane.org>
User-Agent: Mutt/1.5.11
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

On Tue, Nov 07, 2006 at 12:36:16AM +0000, Brad Ramsey wrote:
>Hari Krishna Dara <haridara <at> gmail.com> writes:
>> > From: Christopher Faylor <cgf-no-personal-reply-please <at> cygwin.com>
>> > To: cygwin <at> cygwin.com
>> > Date: Sat, 28 Oct 2006 00:16:09 -0400
>> > Subject: Re: rxvt: Ctrl+C leaves child process of native processes
>> > On Fri, Oct 27, 2006 at 05:40:36PM -0700, Hari Krishna Dara wrote:
>> > >When I hit ^C in an rxvt window (no X), it doesn't result in killing
>> > >all the child processes.
>> > >
>> > >In this specific case, I am running ant, either through ant.bat, ant
>> > >(shell script) or through a custom perl wrapper (which directly
>> > >executes java bypassing  ant.bat or ant).
>> > >
>> > >When the perl wrapper is used it is started from another batch file,
>> > >so here is how the process execution:
>> > >- batch starts a perl command
>> > >- perl command starts java (ant)
>> > >- ant starts another java process
>> > >
>> > >The process tree as shown by sysinternals' process explorer is:
>> > >
>> > >bash
>> > > cmd
>> > >   perl
>> > >     java
>> > >       java
>> > >
>> > >When I hit ^C, bash and cmd exit immediately leaving perl and the two
>> > >java processes.
>> >
>> > Cygwin has no way of knowing what the children of non-cygwin
>> > subprocesses are.  So, as you've found, if you don't use a Cygwin
>> > program, you won't get linux-like signal results.  This shouldn't be
>> > *too* surprising.
>> 
>> I don't completely agree with you. If that is the case, then hitting
>> ^C in any bash shell should behave the same, but for bash running in a
>> native terminal it works as expected. it is not uncommon for make and
>> other build systems to span number of child processes, and it would be
>> a havoc if these didn't get killed properly (and would make cygwin
>> almost unusable). I believe that the problem has something to do with
>> rxvt.
>
>I have a somewhat simpler version of the same issue:
>
>1. Start a bash shell using the standard cywin batch file under XP.  The batch
>file contains:
>
>@echo off
>
>C:
>chdir C:\cygwin\bin
>
>bash --login -i
>
>2. Run the following command:
>rxvt -sl 200 -e bash --login -i
>
>
>rxvt opens a new window with a bash shell.  Windows reports two bash
>processes.  If I use the close button on the rxvt window, the rxvt
>terminates but both bash processes remain.  The second process is an
>orphaned child from rxvt.
>
>This was done using a standard cygwin install onto XP as of 6 Nov 2006.

Given that there is no CTRL-C mentioned above there is no reason to
conclude that whatever you're observing has anything to do with a
situation relating to how non-cygwin programs handle CTRL-C.

This is my last message on the subject.  I'm not going to argue
suppositions any further.

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

- Raw text -


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