From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/1956 Path: news.gmane.org!not-for-mail From: Joan Picanyol i Puig Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: redirection tricks on processor invocation Date: Fri, 12 Jun 2009 13:48:43 +0200 Message-ID: <20090612114842.GA33977@grummit.biaix.org> References: <20090602104820.GB80818@grummit.biaix.org> <20090603062658.GB5167@skarnet.org> <20090603103101.GA26521@grummit.biaix.org> <20090603103856.GB26521@grummit.biaix.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1244807247 7190 80.91.229.12 (12 Jun 2009 11:47:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 12 Jun 2009 11:47:27 +0000 (UTC) To: supervision@list.skarnet.org Original-X-From: supervision-return-2191-gcsg-supervision=m.gmane.org@list.skarnet.org Fri Jun 12 13:47:25 2009 Return-path: Envelope-to: gcsg-supervision@gmane.org Original-Received: from antah.skarnet.org ([212.85.147.14]) by lo.gmane.org with smtp (Exim 4.50) id 1MF5ED-0006yb-9S for gcsg-supervision@gmane.org; Fri, 12 Jun 2009 13:47:25 +0200 Original-Received: (qmail 26136 invoked by uid 76); 12 Jun 2009 11:48:27 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Archive: Original-Received: (qmail 26126 invoked from network); 12 Jun 2009 11:48:27 -0000 Mail-Followup-To: supervision@list.skarnet.org Content-Disposition: inline In-Reply-To: <20090603103856.GB26521@grummit.biaix.org> User-Agent: Mutt/1.5.11 Xref: news.gmane.org gmane.comp.sysutils.supervision.general:1956 Archived-At: * Joan Picanyol i Puig [20090603 12:38]: > * Joan Picanyol i Puig [20090603 12:31]: > > * Laurent Bercot [20090603 08:27]: > > > > In summary, I want a copy of my processor's stdin to be seen by svlogd > > > > as my processor's stdout. Any ideas? > > > > > > Use multitee: http://code.dogmap.org/fdtools/multitee/ > > > > > > Your processor could be, for instance, if you have execline installed: > > > exec execlineb -c " > > > piperw 6 7 > > > background { fdclose 7 fdmove 0 6 yourapplication } > > > fdclose 6 > > > multitee 0-1,7 > > > " > > > > > > which copies stdin to stdout untouched, but also feeds a copy of > > > stdin to yourapplication's stdin. > > > > Given that piperw apparently has no shell equivalent without a named > > pipe > > I should be able to avoid named pipes using subshells in my > processor's script. A week later, I've been unable to translate this simple execline snippet to shell syntax. I can't figure out a way to workaround the fact that shell pipes are created before redirection. Any hints? tks -- pica