From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Nl9DV-0006CW-Lu for garchives@archives.gentoo.org; Fri, 26 Feb 2010 23:03:30 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 75BC2E0B1A; Fri, 26 Feb 2010 23:03:10 +0000 (UTC) Received: from mail-ew0-f222.google.com (mail-ew0-f222.google.com [209.85.219.222]) by pigeon.gentoo.org (Postfix) with ESMTP id 2F36FE0B1A for ; Fri, 26 Feb 2010 23:03:10 +0000 (UTC) Received: by ewy22 with SMTP id 22so294797ewy.26 for ; Fri, 26 Feb 2010 15:03:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :user-agent:references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=5FQ1JYLYopvccD3lvWiE9+UNKTVnTALd9Oi0C2E3u/o=; b=jsFH7CIXG3jdKLyXRbFw/ESw+bQqlsi2sbGguW8EuJH4lc9Q6d4gtOwy8ZFQcG763b FU75k4jdDfoNQfQaIXGOCpwysC41e75ZIrlouooSNySXEHESRHXgsn29DSOi9kM4VirC hX3qrHRKcvrzfQAD68riKj0xXcWNggPaXaZmA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:references:in-reply-to:mime-version :content-type:content-transfer-encoding:message-id; b=Om7R8bvDa7mj8i03oPkoswH3mMA0969h+rhWe4hmwbuSLVaLII6WgMzlGHk+gp2C7e BARcswQ20MSKnQZCldGJybovw0wpx8+drX7F1Y8J+CWQHztOq9OUQf109ygNGsMrGg5D ymJsDYM5ALqGUp4YIyKJM6a6XQ8Z+Q4Ftqi1k= Received: by 10.213.109.214 with SMTP id k22mr366917ebp.83.1267225389617; Fri, 26 Feb 2010 15:03:09 -0800 (PST) Received: from nazgul.localnet (196-210-238-8.dynamic.isadsl.co.za [196.210.238.8]) by mx.google.com with ESMTPS id 16sm315272ewy.3.2010.02.26.15.03.07 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 26 Feb 2010 15:03:08 -0800 (PST) From: Alan McKinnon To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Re: [OT] attach a perl script to daemon services Date: Sat, 27 Feb 2010 01:00:43 +0200 User-Agent: KMail/1.13.0 (Linux/2.6.32-zen6; KDE/4.4.0; x86_64; ; ) References: <87tyt3g7rr.fsf@newsguy.com> <201002262222.08735.alan.mckinnon@gmail.com> <87d3zrfza4.fsf@newsguy.com> In-Reply-To: <87d3zrfza4.fsf@newsguy.com> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201002270100.43223.alan.mckinnon@gmail.com> X-Archives-Salt: e92ad8c1-4f80-4313-af98-ffecbe6aac4c X-Archives-Hash: 8108884b41b2acd9c159880c5e4bd861 On Friday 26 February 2010 23:44:03 Harry Putnam wrote: > Where I'm weak is the part where the custom script checks if the > daemon is running, before the script itself starts. That part would > need to be something pretty fool proof... maybe just grep ps output > for the daemon? Maybe I'm misunderstanding you, but I don't understand this approach. If the daemon is not running there's nothing in the fifo. Why got to all the complexity of writing an independent program that checks if something is running then does various actions? The script necessarily depends on the daemon running so instead of checking if it is, simply have the daemon start the script. No daemon running = no script launched = no complexity. The script will simply accept what is it is given, no complex checks needed. Seeing as the input is from a logger, chances are you are inserting logs to a db, or launching a log analyser, right? Modern loggers support launching child scripts as a matter of routine. If I'm still off-bat and this approach cannot work for solid technical reasons, then I'll go away and shut if if you say so :-) -- alan dot mckinnon at gmail dot com