Index: trunk/Ohana/src/opihi/pcontrol/StartJob.c
===================================================================
--- trunk/Ohana/src/opihi/pcontrol/StartJob.c	(revision 7917)
+++ trunk/Ohana/src/opihi/pcontrol/StartJob.c	(revision 8424)
@@ -1,9 +1,8 @@
 # include "pcontrol.h"
 
-int StartJob (Job *job) {
+int StartJob (Job *job, Host *host) {
 
   int  i, Nline, status;
   char *line, *p;
-  Host *host;
   IOBuffer buffer;
 
@@ -11,9 +10,6 @@
 
   /* job must have assigned host */
-  host = (Host *) job[0].host;
-  if (host == NULL) {
-    gprint (GP_ERR, "programming error: no assigned host\n");
-    exit (1);
-  }
+  ASSERT (host == (Host *) job[0].host, "invalid host");
+  ASSERT (job  == (Job *) host[0].job, "invalid job");
 
   /* construct command line : job arg0 arg1 ... argN\n */
@@ -48,14 +44,11 @@
 
     default:
-      if (VerboseMode()) gprint (GP_ERR, "unknown status for pclient command: programming error\n");  
-      exit (1);
+      ABORT ("unknown status for pclient command");  
   }
 
   /* check on result of pclient command */
   p = memstr (buffer.buffer, "STATUS", buffer.Nbuffer);
-  if (p == NULL) {
-    gprint (GP_ERR, "programming error: missing STATUS in pclient message\n");
-    exit (1);
-  }
+  ASSERT (p != NULL, "missing STATUS in pclient message");
+
   sscanf (p, "%*s %d", &status);
   switch (status) {
@@ -65,10 +58,8 @@
 
     case -2:
-      gprint (GP_ERR, "programming error: syntax error in pclient command\n");
-      exit (1);
+      ABORT ("syntax error in pclient command");
 
     case -3:
-      gprint (GP_ERR, "programming error: existing child on pclient\n");
-      exit (1);
+      ABORT ("existing child on pclient");
 
     default:
@@ -81,9 +72,8 @@
   }
   /* we should never reach here */
-  gprint (GP_ERR, "programming error: should not reach here (StartJob)\n");
-  exit (1);
+  ABORT ("should not reach here (StartJob)");
 
 failure:
-  /* unlink host & job */
+  // unlink host & job
   job[0].host = NULL;
   host[0].job = NULL;
@@ -94,4 +84,2 @@
   return (FALSE);
 }
-
-/** note : host and job popped off stacks : can't use UnlinkJobAndHost **/
