Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
serverizing a fat process with named pipes
- X-seq: zsh-users 14197
- From: Alexy Khrabrov <deliverable@xxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: serverizing a fat process with named pipes
- Date: Mon, 15 Jun 2009 23:17:00 -0400
- 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=
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
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 <p1 >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 <p1 >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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author