From owner-freebsd-questions Thu Feb 21 4:28:25 2002 Delivered-To: freebsd-questions@freebsd.org Received: from femail12.sdc1.sfba.home.com (femail12.sdc1.sfba.home.com [24.0.95.108]) by hub.freebsd.org (Postfix) with ESMTP id 1EF4C37B402 for ; Thu, 21 Feb 2002 04:28:22 -0800 (PST) Received: from there ([68.82.36.167]) by femail12.sdc1.sfba.home.com (InterMail vM.4.01.03.20 201-229-121-120-20010223) with SMTP id <20020221115052.NIQL6925.femail12.sdc1.sfba.home.com@there>; Thu, 21 Feb 2002 03:50:52 -0800 Content-Type: text/plain; charset="iso-8859-1" From: Eric I.Arnoth Reply-To: earnoth@comcast.net To: Jonathan Chen Subject: Re: syslog.conf problems Date: Thu, 21 Feb 2002 06:48:09 -0500 X-Mailer: KMail [version 1.3] Cc: freebsd-questions@FreeBSD.ORG References: <20020221030958.QQRM18863.femail11.sdc1.sfba.home.com@there> <20020221191235.C22670@grimoire.chen.org.nz> In-Reply-To: <20020221191235.C22670@grimoire.chen.org.nz> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <20020221115052.NIQL6925.femail12.sdc1.sfba.home.com@there> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Thanks much. I wasn't much concerned about the bourne shell script, that was one I pulled off of usenet in desperation, because I just couldn't get any of my Python attempts to work. Why though, would the python scripts have the problems I described in my original mail? Those are reading from stdin (sys.__stdin__.read()). On Thursday 21 February 2002 01:12, Jonathan Chen wrote: > On Wed, Feb 20, 2002 at 10:07:17PM -0500, Eric I.Arnoth wrote: > > If anyone replies to my message, please be sure to keep my email on the > > CC or TO fields, I do not subscribe to this list. > > > > I've been trying to get a script which will take the output from syslog > > and handle it, but I can't get past the hello world stage. I've tried a > > bourne shell script and a python script (which is the language I want to > > write the end-result in). With the bourne shell script, I get countless > > error messages like the following, with decrementing subprocess IDs: > > > > ----------------------------------------------------- > > Feb 20 21:39:10 systemname syslogd: Logging subprocess 1894 (exec > > /hello_log.sh) exited with status 126. > > Feb 20 21:39:10 systemname syslogd: exec /hello_log.sh: Broken pipe > > ----------------------------------------------------- > > > > Here's the bournshell script hello_log.sh: > > ----------------------------------------------------- > > #!/bin/sh > > read line > > echo "$line" >> /test.out > > ----------------------------------------------------- > > syslogd runs as a daemon, and has no terminal associated with it. > When it runs your "read line" will fail, hence the broken pipe > message. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message