Date: Mon, 30 Jan 2006 04:41:10 GMT From: Sam Lawrance <lawrance@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: conf/92523: [patch] allow rc scripts to kill process after a timeout Message-ID: <200601300441.k0U4fAPr078742@freefall.freebsd.org> Resent-Message-ID: <200601300450.k0U4o2lW079988@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 92523 >Category: conf >Synopsis: [patch] allow rc scripts to kill process after a timeout >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Jan 30 04:50:02 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Sam Lawrance >Release: FreeBSD 6.0-STABLE i386 >Organization: >Environment: System: FreeBSD freefall.freebsd.org 6.0-STABLE FreeBSD 6.0-STABLE #0: Sat Dec 10 03:18:20 UTC 2005 kensmith@freefall.freebsd.org:/usr/obj/usr/src/sys/FREEFALL i386 >Description: Services stopped with a new style rc script wait indefinitely for the process to die (using the default behaviour). For some services which become wedged sometimes and don't respond to a TERM signal, it would be useful to be able to kill the process after a timeout. >How-To-Repeat: >Fix: http://people.freebsd.org/~lawrance/patch-rc.subr This patch adds the wait_max_for_pids function. It is similar to wait_for_pids but the first argument is a timeout which specifies the maximum amount of time to wait. The default stop sequence is then changed to check the ${name}_stop_timeout variable. If it is set, the script will call wait_max_for_pids and the process will be killed after the timeout. If ${name}_stop_timeout is unset it the script will use wait_for_pids (ie behaviour unchanged). >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200601300441.k0U4fAPr078742>