From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8563 invoked from network); 16 Jun 2009 03:17:38 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from new-brage.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.254.104) by ns1.primenet.com.au with SMTP; 16 Jun 2009 03:17:38 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 90367 invoked from network); 16 Jun 2009 03:17:27 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 16 Jun 2009 03:17:27 -0000 Received: (qmail 1051 invoked by alias); 16 Jun 2009 03:17:05 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 14197 Received: (qmail 1038 invoked from network); 16 Jun 2009 03:17:05 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 16 Jun 2009 03:17:05 -0000 Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.245]) by bifrost.dotsrc.org (Postfix) with ESMTP id CFF9A8027106 for ; Tue, 16 Jun 2009 05:17:01 +0200 (CEST) Received: by an-out-0708.google.com with SMTP id b38so2238598ana.36 for ; Mon, 15 Jun 2009 20:17:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=7DaX/+X7GttATNmZ1tXch9eLVx3Pk0BD09NcvMjEDOo=; b=F2ttbzzs7wje0aaDIa5moa9sS/CurkgU0G1dLxJRDzIHp3g69AqMk11kxSrfbG+1LH XoaOuVh97nzPy/E5Lnj9NHD7n4vTNSRZkrgIHEZeNoRlDl0jY5DQfEpPcN7BQma43wh/ /+c0ETRyQG+nMthZjJQ68YXmbLdKem0qudXQU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=Jjlh/HEdge1cciqbDdnsTh3hTbEpusmhytTE9+vALPc88p76V+Z9+Op4KZrjFpCFlx zXcr/RGrb3JAvVA9zIGdthYvHi0raQ6YUIjP5Z3xvqWseSzfHf7RfRbYbh2K9kR2WuCB ioVRB7ZQ4DA98ZpFe6dis8FmVfJdxITMfPc2k= MIME-Version: 1.0 Received: by 10.100.177.15 with SMTP id z15mr9766750ane.27.1245122220226; Mon, 15 Jun 2009 20:17:00 -0700 (PDT) Date: Mon, 15 Jun 2009 23:17:00 -0400 Message-ID: <7c737f300906152017m7776d596he8a1251c9e1279b8@mail.gmail.com> Subject: serverizing a fat process with named pipes From: Alexy Khrabrov To: zsh-users@sunsite.dk Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.94.2/9468/Tue Jun 16 02:07:09 2009 on bifrost X-Virus-Status: Clean I have a heavy process, an English parser loading megabytes of models, and then reading stdin, sentence per line, outputting the parsed text to the stdout. How do I properly serverize it -- running in the background with p2, those created with mkfifo p1 p2? Looks like unless I wrap that in a kind of a loop, the processes exit at once. First I did this simulation: mkfifo p1 p1 cat p2 & cat p2 & echo hi > p1 This does print "hi" and then both backgrounds exit. If I wrap them in while true; do ... done & (& from the original goes outside), the simple one looks running continuously, but the parser takes a while starting up every time, apparently... Cheers, Alexy