title: how to redirect stdout of 2nd process back to stdin of 1st process?
body: <p>I have two processes which I need to connect like this:</p>
  
  <p>proc1 -- sends output to proc2
  proc2 -- sends output to proc1</p>
  
  <p>So far, all pipe examples are of this kind:
      proc1 | proc2</p>
  
  <p>That's nice, but how do I make the output of proc2 go to proc1?</p>
  
  <p>A bash example would be nice. A Windows shell example would be great :)</p>
  
  <p>Thanks in advance,
  Adrian.</p>
  
  <p>Adding more details:</p>
  
  <p>The system is expected to work as client-server system in which the client works with the server in a request-response interaction model. The interaction ends when the client has no more requests.</p>
  
  <p>Interaction example:
  client: request1;
  server: response1;
  client: request2;
  server: response2;
  .
  .
  .
  .
  client: closeRequest;
  server: closeApproved;</p>
  
  <p>At this point the server exits following a client exit. End of example.</p>
  
  <p>It seems that a solution like (assuming pipe is available)
  client &lt; pipe | server > pipe
  would not work (please correct me) because in this arrangement the client produces one big request, the shell pipes this big request to the server, then the server produces one big response, and finally the shell pipes this big response to the client.</p>