[comp.unix.questions] pipes & sockets

ifocs9d@aucs.UUCP (Rick Giles) (04/27/89)

I'm learning to program pipes/sockets, but am having problems with the
simplest examples. What I would like to program is a front-end to a
an "interactive" process, such as one generated by a child through
execl("/usr/bin/bc", "bc", (char *) 0). The front-end is in the parent,
piping output to sdtdin for the child, and reading stdout output
through another pipe. (I suppose a socket should also work, but one thing
at a time).

I have tried a very simple example, from p. 132-135 of "UNIX Relational
Database Management", by Manis, et. al. When I run it, all the parent ever
reads from the child-to-parent pipe is just one or two characters, no matter
how long the output string from bc is.

This is on a Sun4/280, under OS 4.0. 

Any hints would be appreciated, especially a very small example which
works and which extends the method of Manis to having several streams of data
travelling back and forth. The same thing appears to be going on with
the processes in University Ingres, but I'm in a bit of a hurry. Thanks.

Rick Giles

Bitnet:   FRGILES@Acadia
Internet: FRGILES%Acadia.BITNET@CUNYVM.CUNY.EDU 
UUCP:     uunet!dalcs!aucs!ifocs9d