Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

serverizing a fat process with named pipes



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