From owner-freebsd-bugs@FreeBSD.ORG Mon Jan 30 04:50:03 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BA28016A420 for ; Mon, 30 Jan 2006 04:50:03 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2886743D58 for ; Mon, 30 Jan 2006 04:50:03 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k0U4o2vH079989 for ; Mon, 30 Jan 2006 04:50:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k0U4o2lW079988; Mon, 30 Jan 2006 04:50:02 GMT (envelope-from gnats) Resent-Date: Mon, 30 Jan 2006 04:50:02 GMT Resent-Message-Id: <200601300450.k0U4o2lW079988@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Sam Lawrance Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3B9F716A420 for ; Mon, 30 Jan 2006 04:41:11 +0000 (GMT) (envelope-from lawrance@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 089A143D48 for ; Mon, 30 Jan 2006 04:41:11 +0000 (GMT) (envelope-from lawrance@FreeBSD.org) Received: from freefall.freebsd.org (lawrance@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k0U4fArr078743 for ; Mon, 30 Jan 2006 04:41:10 GMT (envelope-from lawrance@freefall.freebsd.org) Received: (from lawrance@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k0U4fAPr078742; Mon, 30 Jan 2006 04:41:10 GMT (envelope-from lawrance) Message-Id: <200601300441.k0U4fAPr078742@freefall.freebsd.org> Date: Mon, 30 Jan 2006 04:41:10 GMT From: Sam Lawrance To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: conf/92523: [patch] allow rc scripts to kill process after a timeout X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Sam Lawrance List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2006 04:50:03 -0000 >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: