Date: Sun, 29 Jan 2006 15:15:41 +0100 From: Florent Thoumie <flz@xbsd.org> To: freebsd-rc@freebsd.org Cc: Sam Lawrance <boris@brooknet.com.au> Subject: Re: [patch] kill process after a timeout Message-ID: <200601291515.47052.flz@xbsd.org> In-Reply-To: <61138162-C7EB-4DC8-B106-F060D468DE70@brooknet.com.au> References: <61138162-C7EB-4DC8-B106-F060D468DE70@brooknet.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200601291515.47052.flz>