Index: trunk/Ohana/src/opihi/pcontrol/PclientCommand.c
===================================================================
--- trunk/Ohana/src/opihi/pcontrol/PclientCommand.c	(revision 17475)
+++ trunk/Ohana/src/opihi/pcontrol/PclientCommand.c	(revision 17476)
@@ -6,5 +6,4 @@
 
   int status;
-  IOBuffer buffer;
 
   ASSERT (host != NULL, "host missing");
@@ -12,8 +11,9 @@
 
   // flush the stdout and stderr buffers here
-  ReadtoIOBuffer (&buffer, host[0].stdout_fd);
-  FlushIOBuffer (&buffer);
-  ReadtoIOBuffer (&buffer, host[0].stderr_fd);
-  FlushIOBuffer (&buffer);
+  // recycle comms_buffer to minimize page thrashing
+  ReadtoIOBuffer (&host[0].comms_buffer, host[0].stdout_fd);
+  FlushIOBuffer (&host[0].comms_buffer);
+  ReadtoIOBuffer (&host[0].comms_buffer, host[0].stderr_fd);
+  FlushIOBuffer (&host[0].comms_buffer);
 
   /* send command to client (adding on \n) */
@@ -30,4 +30,6 @@
   host[0].response = response;
   FlushIOBuffer (&host[0].comms_buffer);
+
+  // fprintf (stderr, "command: %s\n", command);
 
   return (PCLIENT_GOOD);
@@ -67,9 +69,5 @@
   if (status == -1) return (PCLIENT_HUNG);
 
-  // fprintf (stderr, "buffer.buffer: %s\n", buffer[0].buffer);
-
-  // we have detected a valid response, clear the response data
-  host[0].response_state = PCONTROL_RESP_NONE;
-  host[0].response = NULL;
+  // fprintf (stderr, "response: %s\n", buffer[0].buffer);
 
   return (PCLIENT_GOOD);
