Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Aug 2007 21:11:32 -0400 (EDT)
From:      Darren Henderson <darren@nighttide.net>
To:        freebsd-questions@freebsd.org
Subject:   syslogd, exec and alarms
Message-ID:  <20070820201824.V99831@olmec>

next in thread | raw e-mail | index | archive | help

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070820201824.V99831>