X-Spam-Check-By: sourceware.org
To: cygwin@cygwin.com
From: Jim Seymour <nntp.ff@thentao.com>
Subject:  Re: How do I kill a grandchild process from shell program?
Date:  Tue, 24 Oct 2006 15:07:59 -0700
Lines: 16
Message-ID: <ehm2ru$2s2$2@sea.gmane.org>
References:  <ehjll0$4f7$1@sea.gmane.org> <ehlr51$nh$4@sea.gmane.org>
Mime-Version:  1.0
Content-Type:  text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding:  7bit
User-Agent: Thunderbird 1.5.0.7 (Windows/20060909)
In-Reply-To: <ehlr51$nh$4@sea.gmane.org>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
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

Matthew Woehlke wrote:
> 'kill -SIGHUP <process>'?

Thanks.  Unfortunately, the problem I had was really about how to find 
the pid from within a shell program.  In the end, a combination of ps, 
grep, tr, and cut seemed to do the trick.

> Or if the child is a bash script, you might be able to re-write it to
> trap a signal (e.g. SIGUSR1) that instructs the child to kill /its/
> child (the assumption being that the child knows its own child's
> PID).

This is not a bad idea.  I may explore this in a future rev...

-- 
Jim Seymour


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

