IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 10, 2008, 12:51:04 PM (18 years ago)
Author:
eugene
Message:

allow job stdout / stderr from pclient to arrive slowly

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/pcontrol/CheckBusyJob.c

    r17477 r20047  
    8181  if (!strcmp(string, "EXIT")) outstate = PCONTROL_JOB_EXIT;
    8282  if (!strcmp(string, "CRASH")) outstate = PCONTROL_JOB_CRASH;
    83   ASSERT (outstate != PCONTROL_JOB_BUSY, "invalid status response (CheckBusyJobResponse)");
     83  if (outstate == PCONTROL_JOB_BUSY) {
     84    if (DEBUG || VerboseMode()) gprint (GP_ERR, "invalid status response (CheckBusyJobResponse), try again\n");
     85    PutHost (host, PCONTROL_HOST_BUSY, STACK_BOTTOM);
     86    PutJob (job, PCONTROL_JOB_BUSY, STACK_BOTTOM);
     87    return (TRUE);
     88  }
     89
    8490
    8591  /* parse the exit status and sizes of output buffers */
     
    8793  sscanf (p, "%*s %d", &job[0].exit_status);
    8894  p = memstr (buffer[0].buffer, "STDOUT", buffer[0].Nbuffer);
    89   sscanf (p, "%*s %d", &job[0].stdout_size);
     95  sscanf (p, "%*s %d", &job[0].stdout.size);
    9096  p = memstr (buffer[0].buffer, "STDERR", buffer[0].Nbuffer);
    91   sscanf (p, "%*s %d", &job[0].stderr_size);
     97  sscanf (p, "%*s %d", &job[0].stderr.size);
    9298
    9399  // XXX runaway job if output too large?
    94   if (job[0].stdout_size > 0x100000) abort();
    95   if (job[0].stderr_size > 0x100000) abort();
     100  if (job[0].stdout.size > 0x1000000) abort();
     101  if (job[0].stderr.size > 0x1000000) abort();
    96102
    97103  // job has exited : move to DONE stack
Note: See TracChangeset for help on using the changeset viewer.