Dissimilar Program Interaction?
kadie at uiucdcsb.cs.uiuc.edu
kadie at uiucdcsb.cs.uiuc.edu
Wed Oct 1 09:58:00 AEST 1986
I need to allow a number of very dissimilar programs to
interact. Each of the programs reads from standard input
and writes to standard output.
I imagine that I want Unix pipes connecting each of the
sub-programs to an executive program.
Looking through the UNIX library I found a function that
does almost what I want, namely popen. As in:
FILE *pstrm;
pstrm = popen("cat >response","w")
This will start cat running such that the executive can
make stream writes (fprint) to it. The problem is
that I want to both fscan and fprint with each subprocesses.
An alternative function is the pipe command. It allows
read and write. Unfortunately I don't know how to
connect the pipe(s) to standard input and standard output
of the sub-program.
Also this does not permit fscan and fprint.
Any advice or leads will be desperately appreciated.
Carl Kadie
More information about the Comp.unix
mailing list