Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Jan 2006 00:38:50 +1100
From:      Sam Lawrance <boris@brooknet.com.au>
To:        rc@FreeBSD.org
Subject:   [patch] kill process after a timeout
Message-ID:  <61138162-C7EB-4DC8-B106-F060D468DE70@brooknet.com.au>

next in thread | raw e-mail | index | archive | help
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=10, 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?




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?61138162-C7EB-4DC8-B106-F060D468DE70>