Index: trunk/Ohana/src/opihi/lib.shell/multicommand.c
===================================================================
--- trunk/Ohana/src/opihi/lib.shell/multicommand.c	(revision 12404)
+++ trunk/Ohana/src/opihi/lib.shell/multicommand.c	(revision 16002)
@@ -2,4 +2,5 @@
 
 static int server = 0;
+static int bufferPending = FALSE;
 
 // XXX this is rather pantasks-specific...
@@ -55,4 +56,10 @@
     if (*tmpline) {
 
+      if (bufferPending) {
+	// flush old messages
+	while (ExpectMessage (server, 0.2, &message));
+	bufferPending = FALSE;
+      }
+
       status = command (tmpline, &outline, verbose);
 
@@ -66,6 +73,7 @@
 		exit (1);
 	      default:
-		gprint (GP_ERR, "I/O error sending server message\n");
-		exit (2);
+		gprint (GP_ERR, "server is busy...\n");
+		bufferPending = TRUE;
+		goto escape;
 	    }
 	  }
@@ -78,6 +86,7 @@
 		exit (1);
 	      default:
-		gprint (GP_ERR, "I/O error sending server message\n");
-		exit (2);
+		gprint (GP_ERR, "server is busy...\n");
+		bufferPending = TRUE;
+		goto escape;
 	    }
 	  } else {
@@ -92,6 +101,7 @@
 		exit (1);
 	      default:
-		gprint (GP_ERR, "I/O error sending server message\n");
-		exit (2);
+		gprint (GP_ERR, "server is busy...\n");
+		bufferPending = TRUE;
+		goto escape;
 	    }
 	  } else {
@@ -106,6 +116,7 @@
 		exit (1);
 	      default:
-		gprint (GP_ERR, "I/O error sending server message\n");
-		exit (2);
+		gprint (GP_ERR, "server is busy...\n");
+		bufferPending = TRUE;
+		goto escape;
 	    }
 	  } else {
@@ -117,5 +128,5 @@
 	}	
       }
-
+    escape:
       if (outline != NULL) free (outline);
       if (!status && auto_break) done = TRUE;
