From owner-freebsd-hackers Sat Oct 13 10:57:52 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from air.linkclub.or.jp (air.linkclub.or.jp [210.250.19.40]) by hub.freebsd.org (Postfix) with ESMTP id BD92837B40C for ; Sat, 13 Oct 2001 10:57:46 -0700 (PDT) Received: from localhost.jp.FreeBSD.org (1Cust4.tnt1.hanno.jp.da.uu.net [63.12.195.4]) by air.linkclub.or.jp (8.11.4/8.11.4) with ESMTP id f9DHvXW12507 for ; Sun, 14 Oct 2001 02:57:34 +0900 (JST) (envelope-from toshi@jp.FreeBSD.org) Date: Sun, 14 Oct 2001 02:29:35 +0900 (JST) Message-Id: <200110131729.f9DHTZO15603.toshi@jp.FreeBSD.org> From: Toshihiko ARAI To: clefevre@citeweb.net Cc: freebsd-hackers@FreeBSD.org Subject: Re: [patch] extension of newsyslog In-Reply-To: <200110082136.f98LaqW83498@gits.dyndns.org> References: <200110081527.f98FR5A56224.toshi@jp.FreeBSD.org> <200110082136.f98LaqW83498@gits.dyndns.org> X-Mailer: VM 5.96 (beta) / Mule 2.3 (SUETSUMUHANA) based on 19.34.1 Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG + <200110082136.f98LaqW83498@gits.dyndns.org>, Cyrille Lefevre wrote: >> I add script call features to newsyslog. This adds a one field to >> newsyslog.conf. When newsyslog processed log file, this can execute >> arbitrary program. >> >> Situation to assume: >> * For the log file which cannot use signal. >> * Cases to do statistical application for log file. By the way, is there a user needing such a features really? It may not be general besides me. If it is features to be comparatively general, as for it, what specification method is desirable? > it would be interresting to have the possibility to pass optional > args to program. The first patch does not consider it. It specified merely pathname of program. I put a patch of a update version in the following URL. http://people.freebsd.org/~toshi/d/ > also, how about testing for the first (or the last) char to be & > to run the program asynchronously ? Command execution goes by way of /bin/sh in a new patch. Asynchronous execution of program became possible. > much better, always run the program asynchronously so that hanging > programs (who knowns?) don't block the whole process. to do this, > somewhere in main(), add something such as signal(SIGCHLD, SIG_IGN) > and delete the while statment in post_prog(). I added some debug routine, and I tested it. So far a problem does not occur. -- Toshihiko ARAI To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message