From owner-freebsd-questions@FreeBSD.ORG Tue Aug 21 01:35:13 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA1ED16A419 for ; Tue, 21 Aug 2007 01:35:13 +0000 (UTC) (envelope-from darren@nighttide.net) Received: from olmec.nighttide.net (jasper.nighttide.net [207.5.141.146]) by mx1.freebsd.org (Postfix) with ESMTP id 699DF13C45B for ; Tue, 21 Aug 2007 01:35:13 +0000 (UTC) (envelope-from darren@nighttide.net) Received: from olmec.nighttide.net (darren@localhost [127.0.0.1]) by olmec.nighttide.net (8.14.1/8.14.1) with ESMTP id l7L1BXYI001121 for ; Mon, 20 Aug 2007 21:11:33 -0400 (EDT) (envelope-from darren@nighttide.net) Received: from localhost (darren@localhost) by olmec.nighttide.net (8.14.1/8.14.1/Submit) with ESMTP id l7L1BWvH001118 for ; Mon, 20 Aug 2007 21:11:33 -0400 (EDT) (envelope-from darren@nighttide.net) X-Authentication-Warning: olmec.nighttide.net: darren owned process doing -bs Date: Mon, 20 Aug 2007 21:11:32 -0400 (EDT) From: Darren Henderson To: freebsd-questions@freebsd.org Message-ID: <20070820201824.V99831@olmec> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Subject: syslogd, exec and alarms X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2007 01:35:13 -0000 I have a syslog.conf line that has a selector pointing to action that is a perl script. The script takes action based on the content of the line passed to it. Simple stuff. Works fine. Wanting to be resource sensitive, I would like the script to terminate after so many idle seconds - its likely to get occasional bursts of input with quiet periods here and there. No problem, set an alarm with a maximum idle time and shutdown if it fires. This works fine if I execute the script from the command line. Doesn't work at all if spawned by syslogd. I assume syslogd or the sh being fired to spawn the command are grabbing the alarm signal for themselves. I am missing something obvious. Is there any way to make this work? As it is I can keep the program going all the time or I can have syslogd respawn it every time a line is sent. Neither option is appealing. This problem seems to be relatively resistant to google searches for me thus far. -Darren