Index: trunk/Ohana/src/opihi/pcontrol/StopHosts.c
===================================================================
--- trunk/Ohana/src/opihi/pcontrol/StopHosts.c	(revision 18098)
+++ trunk/Ohana/src/opihi/pcontrol/StopHosts.c	(revision 25872)
@@ -69,15 +69,24 @@
 }
 
-int StopHost (Host *host) {
+int StopHost (Host *host, int mode) {
 
   int       status;
 
-  status = PclientCommand (host, "exit", "Goodbye", PCONTROL_RESP_STOP_HOST);
+  switch (mode) {
+    case PCONTROL_HOST_DOWN:
+      status = PclientCommand (host, "exit", "Goodbye", PCONTROL_RESP_DOWN_HOST);
+      break;
+    case PCONTROL_HOST_OFF:
+      status = PclientCommand (host, "exit", "Goodbye", PCONTROL_RESP_STOP_HOST);
+      break;
+    default:
+      ABORT ("programming error: invalid StopHost mode");
+  }
 
   /* check on success of pclient command */
   switch (status) {
     case PCLIENT_DOWN:
-      // XXX this is the desired result in any case, so ignore it
-      break;
+      PutHost (host, PCONTROL_HOST_RESP, STACK_BOTTOM);
+      return (TRUE);
 
     case PCLIENT_GOOD:
@@ -96,4 +105,11 @@
 
   OffHost (host);
+  HarvestHost (host[0].pid);
+  return (TRUE);
+}
+
+int DownHostResponse (Host *host) {
+
+  DownHost (host);
   HarvestHost (host[0].pid);
   return (TRUE);
@@ -134,7 +150,5 @@
       
     case 0:
-      gprint (GP_ERR, "child did not exit??");
-      abort ();
-      /** put back in IDLE state? **/
+      gprint (GP_ERR, "HarvestHost: child with connection to remote host failed to exit: may be hung");
       break;
 
