From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/1957 Path: news.gmane.org!not-for-mail From: Laurent Bercot Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: redirection tricks on processor invocation Date: Sat, 13 Jun 2009 07:13:04 +0200 Message-ID: <20090613051304.GA11204@skarnet.org> References: <20090602104820.GB80818@grummit.biaix.org> <20090603062658.GB5167@skarnet.org> <20090603103101.GA26521@grummit.biaix.org> <20090603103856.GB26521@grummit.biaix.org> <20090612114842.GA33977@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 1244869926 30280 80.91.229.12 (13 Jun 2009 05:12:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 13 Jun 2009 05:12:06 +0000 (UTC) To: supervision@list.skarnet.org Original-X-From: supervision-return-2192-gcsg-supervision=m.gmane.org@list.skarnet.org Sat Jun 13 07:12:02 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 1MFLX7-0002u4-GX for gcsg-supervision@gmane.org; Sat, 13 Jun 2009 07:12:01 +0200 Original-Received: (qmail 17332 invoked by uid 76); 13 Jun 2009 05:13:05 -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 17324 invoked by uid 1000); 13 Jun 2009 05:13:04 -0000 Mail-Followup-To: supervision@list.skarnet.org Content-Disposition: inline In-Reply-To: <20090612114842.GA33977@grummit.biaix.org> User-Agent: Mutt/1.4i Xref: news.gmane.org gmane.comp.sysutils.supervision.general:1957 Archived-At: > 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? Your problem is that the shell can't open anonymous fds. The only way to get an anonymous pipe is the | construct, which does not open more fds because it's redirected at once to 1 and 0. The multitee command needs one more fd to be opened, and you can't do that with anonymous pipes. You need a named pipe for this: mkfifo /tmp/fifo ; yourapplication /tmp/fifo multitee 0-1,7 Inelegant? Unsatisfying? Go forth, o my convert, and preach the virtues of execline. :) -- Laurent