[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] Controlling output of processes
From: |
Lasse Kliemann |
Subject: |
[Chicken-users] Controlling output of processes |
Date: |
Fri, 12 Mar 2010 17:14:02 +0100 |
How can I start a process and control where it sends its stdout
or stderr? I know that I can do:
(receive
(p-stdout p-stdin p-pid p-stderr)
(process* command args)
(...))
This gives input and output ports connected to the process. But
how can I express, e.g.: "everything available on port p-stdout
should go to (current-output-port)"? Or similar statements
involving p-stdout and/or p-stderr? I could use a loop that reads
from those ports and writes to (current-output-port) until it
sees EOF. But this feels plain wrong. In particular, when
forwarding both p-stdout and p-stderr, this would not represent
the order in which the process generated the output (but it would
first show all its stdout and then all its stderr, or vice
versa).
Can you give me some suggestions?
pgpHYjyRRe3b3.pgp
Description: PGP signature