From owner-freebsd-rc@FreeBSD.ORG Sun Jan 29 14:16:15 2006 Return-Path: X-Original-To: freebsd-rc@freebsd.org Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D16EF16A420 for ; Sun, 29 Jan 2006 14:16:15 +0000 (GMT) (envelope-from flz@xbsd.org) Received: from smtp.xbsd.org (xbsd.org [82.233.2.192]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4B1A143D46 for ; Sun, 29 Jan 2006 14:16:15 +0000 (GMT) (envelope-from flz@xbsd.org) Received: from localhost (localhost.xbsd.org [127.0.0.1]) by smtp.xbsd.org (Postfix) with ESMTP id C40C211612; Sun, 29 Jan 2006 15:16:07 +0100 (CET) Received: from smtp.xbsd.org ([127.0.0.1]) by localhost (srv1.xbsd.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 38994-06; Sun, 29 Jan 2006 15:15:56 +0100 (CET) Received: from cream.xbsd.org (cream.xbsd.org [192.168.42.6]) by smtp.xbsd.org (Postfix) with ESMTP id 20F8B115A0; Sun, 29 Jan 2006 15:15:55 +0100 (CET) From: Florent Thoumie To: freebsd-rc@freebsd.org Date: Sun, 29 Jan 2006 15:15:41 +0100 User-Agent: KMail/1.8.2 References: <61138162-C7EB-4DC8-B106-F060D468DE70@brooknet.com.au> In-Reply-To: <61138162-C7EB-4DC8-B106-F060D468DE70@brooknet.com.au> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1317508.SaHREVnU65"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200601291515.47052.flz@xbsd.org> X-Virus-Scanned: amavisd-new at xbsd.org Cc: Sam Lawrance Subject: Re: [patch] kill process after a timeout X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2006 14:16:15 -0000 --nextPart1317508.SaHREVnU65 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Sunday 29 January 2006 14:38, Sam Lawrance wrote: > http://people.freebsd.org/~lawrance/patch-rc.subr > > This patch adds the ${name}_stop_timeout variable. When set, rather > than simply wait on the PIDS after sending a -TERM signal, they will > be kill -9'ed after the specified timeout in seconds. > > For example, with a tomcat script I'm working on, I set > jakarta_tomcat41_stop_timeout=3D10, then > > # sh tomcat41.sh forcestop > Stopping jakarta_tomcat41. > Waiting (max 10 secs) for PIDS: 42864, 42864, 42864, 42864, 42864. > > I need to do something like this anyway with the tomcat rc scripts, I > figure it might be a useful addition to rc.subr. > > Thoughts? Looks good to me. But I wondered if we really have cases where we don't wan= t=20 to wait with some timeout. I guess I would have modified wait_for_pid to ta= ke=20 $name_stop_timeout as a new argument (defaulting to 10, for example) instea= d=20 of copying wait_for_pid to a new function. My 0.02$ :) =2D-=20 =46lorent Thoumie flz@FreeBSD.org =46reeBSD Committer --nextPart1317508.SaHREVnU65 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQBD3M4SMxEkbVFH3PQRAkCUAKCPPVXuyIeamA2qXRxxPWEt3bCJwgCeJGNG 8E0V07+hwmDZZFLGnoVg7tQ= =kcE/ -----END PGP SIGNATURE----- --nextPart1317508.SaHREVnU65--