[Haskell-cafe] Blocking IO & FIFOs

Donn Cave donn at avvanta.com
Sat Oct 20 18:38:56 CEST 2012

Quoth Jason Dusek <jason.dusek at gmail.com>,
> For my application, it's important to be able to run multiple
> queries against the same Bash session. Waiting for Bash to shut
> down is thus not a viable way to finalize the response.

You could redirect to disk files and also use a pipe to wait for exit.

I suppose you redirect I/O for individual queries by applying shell
redirections to the command?  So like this,

   uname -a > /tmp/cmd1 2> /tmp/cmd2 7> /tmp/exitpipe

... then read from /tmp/exitpipe, ignore empty result and read command
outputs from the disk files.


More information about the Haskell-Cafe mailing list