From owner-freebsd-questions@FreeBSD.ORG Tue Aug 21 02:21:55 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 D54FE16A41B for ; Tue, 21 Aug 2007 02:21:55 +0000 (UTC) (envelope-from mnslinky@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.180]) by mx1.freebsd.org (Postfix) with ESMTP id 9375413C48A for ; Tue, 21 Aug 2007 02:21:55 +0000 (UTC) (envelope-from mnslinky@gmail.com) Received: by py-out-1112.google.com with SMTP id u77so2424489pyb for ; Mon, 20 Aug 2007 19:21:55 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:in-reply-to:references:mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer; b=I2e60aTyqG1P8PgK4cjMdlVdjHuQio0UlGdtlEJEBBO0k8Cojkjo4Ywt+EXy2TuwQula3cNvWCMon1jktOloGQGTYvenuWbQmnMTvi16twZ5swgveHgBmQ9tcSQQwADIaAbKRTcjSV2UzIcTNo5YpZO5iKjPcK4d1pieo6sCENs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:in-reply-to:references:mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer; b=TTSGKHPEDSVvUUFXoWOrBfahqMDe0OIwhLSuSKasDDg8n/mh9vSQ0yO7/4RqKVvtEwV/nN14kJyL4sIcfu27zqzusFFCphWzxAKTNQFesdg38sWkg3Cc4u4a8ERsOUaAduXXhaFnVMaxNj/B4nw38ma3ZwKbrDnPSxT/oJaKi1E= Received: by 10.35.26.14 with SMTP id d14mr8186825pyj.1187662914451; Mon, 20 Aug 2007 19:21:54 -0700 (PDT) Received: from ?192.168.1.3? ( [209.240.66.157]) by mx.google.com with ESMTPS id a79sm9776178pye.2007.08.20.19.21.52 (version=SSLv3 cipher=OTHER); Mon, 20 Aug 2007 19:21:52 -0700 (PDT) In-Reply-To: <20070820201824.V99831@olmec> References: <20070820201824.V99831@olmec> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Eric Crist Date: Mon, 20 Aug 2007 21:21:44 -0500 To: Darren Henderson X-Mailer: Apple Mail (2.752.3) Cc: freebsd-questions@freebsd.org Subject: Re: 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 02:21:55 -0000 On Aug 20, 2007, at 8:11 PMAug 20, 2007, Darren Henderson wrote: > > 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, From my limited understanding, the process that is spawned by that alarm is killed by syslogd once whatever it's supposed to do is killed. I'm not sure what options you've really got. HTH ----- Eric F Crist Secure Computing Networks