Index: /trunk/Ohana/src/opihi/lib.shell/gprint.c
===================================================================
--- /trunk/Ohana/src/opihi/lib.shell/gprint.c	(revision 10666)
+++ /trunk/Ohana/src/opihi/lib.shell/gprint.c	(revision 10667)
@@ -185,7 +185,7 @@
 int gprint (gpDest dest, char *format, ...) {
 
+  int status;
   gpStream *stream;
   va_list argp;  
-  int status;
 
   stream = gprintGetStream (dest);
Index: /trunk/Ohana/src/opihi/pclient/pclient.c
===================================================================
--- /trunk/Ohana/src/opihi/pclient/pclient.c	(revision 10666)
+++ /trunk/Ohana/src/opihi/pclient/pclient.c	(revision 10667)
@@ -6,4 +6,7 @@
 # define opihi_history ""
 # define opihi_rcfile ".pcontrolrc"
+
+void dummy_prep_term (int flag) {
+}
 
 /* program-dependent initialization */
@@ -17,4 +20,5 @@
   InitChild ();
 
+  rl_prep_term_function = dummy_prep_term;
   rl_readline_name = opihi_name;
   rl_attempted_completion_function = command_completer;
@@ -59,2 +63,3 @@
   exit (status);
 }
+
Index: /trunk/Ohana/src/opihi/pcontrol/CheckIdleHost.c
===================================================================
--- /trunk/Ohana/src/opihi/pcontrol/CheckIdleHost.c	(revision 10666)
+++ /trunk/Ohana/src/opihi/pcontrol/CheckIdleHost.c	(revision 10667)
@@ -90,5 +90,5 @@
     UnlockStack (stack);
     StartJob (job, host);
-   return (TRUE);
+    return (TRUE);
   }
   UnlockStack (stack);
Index: /trunk/Ohana/src/opihi/pcontrol/PclientCommand.c
===================================================================
--- /trunk/Ohana/src/opihi/pcontrol/PclientCommand.c	(revision 10666)
+++ /trunk/Ohana/src/opihi/pcontrol/PclientCommand.c	(revision 10667)
@@ -18,5 +18,9 @@
   request.tv_nsec = 100000;
 
+  // flush the stdout and stderr buffers here
   ReadtoIOBuffer (buffer, host[0].stdout);
+  FlushIOBuffer (buffer);
+
+  ReadtoIOBuffer (buffer, host[0].stderr);
   FlushIOBuffer (buffer);
 
