From owner-freebsd-ports@FreeBSD.ORG Thu Mar 30 01:01:04 2006 Return-Path: X-Original-To: freebsd-ports@freebsd.org Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C5AD416A420 for ; Thu, 30 Mar 2006 01:01:04 +0000 (UTC) (envelope-from danny@ricin.com) Received: from smtpq1.groni1.gr.home.nl (smtpq1.groni1.gr.home.nl [213.51.130.200]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5C3ED43D48 for ; Thu, 30 Mar 2006 01:01:03 +0000 (GMT) (envelope-from danny@ricin.com) Received: from [213.51.130.188] (port=51933 helo=smtp3.groni1.gr.home.nl) by smtpq1.groni1.gr.home.nl with esmtp (Exim 4.30) id 1FOlX5-0008Iz-1n; Thu, 30 Mar 2006 03:01:03 +0200 Received: from cp464173-a.dbsch1.nb.home.nl ([84.27.215.228]:51600 helo=desktop.homenet) by smtp3.groni1.gr.home.nl with esmtp (Exim 4.30) id 1FOlX3-0001XB-Q2; Thu, 30 Mar 2006 03:01:01 +0200 From: Danny Pansters To: Paul Schmehl Date: Thu, 30 Mar 2006 03:00:53 +0200 User-Agent: KMail/1.9.1 References: <6F8EC8DCFAC4D47258FEF35B@Paul-Schmehls-Computer.local> In-Reply-To: <6F8EC8DCFAC4D47258FEF35B@Paul-Schmehls-Computer.local> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200603300300.53523.danny@ricin.com> X-AtHome-MailScanner-Information: Please contact support@home.nl for more information X-AtHome-MailScanner: Found to be clean Cc: freebsd-ports@freebsd.org Subject: Re: Problem stopping a program X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2006 01:01:04 -0000 On Wednesday 29 March 2006 04:31, Paul Schmehl wrote: > I'm working on a new port that uses a tcl script in daemon mode. I've > written an rc.d script to start and stop the daemon, and I'm having a > problem stopping the daemon. If I do it immediately, it stops just fine, > but if I leave the daemon running for a while, I cannot. (The daemon > spawns two child processes after it's started.) > > Here's an example: /usr/local/etc/rc.d/sguild.sh restart > Stopping sguild > Waiting for PIDS: 4554 4558 4559, 4554 4558 4559, 4554 4558 4559, 4554 4558 > 4559, 4554 4558 4559, 4554 4558 4559, 4554 4558 4559, 4554 4558 4559, 4554 > 4558 4559, 4554 4558 4559, 4554 4558 4559, 4554 4558 4559, 4554 4558 4559, > 4554 4558 4559, > > This will go on indefinitely. If I kill the process and then try > restarting again, the child processes are gone, but the parent process is > not. Try pkill/pgrep (p=parent) ? HTH, Dan