IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 13, 2005, 10:30:13 AM (21 years ago)
Author:
eugene
Message:

working on speed issues

File:
1 edited

Legend:

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

    r4705 r4762  
    11# include "pcontrol.h"
    2 # define PCLIENT_TIMEOUT 20
     2# define PCLIENT_TIMEOUT 500
    33
    44/* we read Nbytes from the host, then watch for the prompt */
     
    77  int i, status, Nstart;
    88  char *line;
     9  struct timespec request, remain;
    910
    1011  /* flush any earlier messages */
     
    1213  FlushIOBuffer (buffer);
    1314  Nstart = buffer[0].Nbuffer;
     15
     16  /* avoid blocking on waitpid, test every 100 usec, up to 50 msec */
     17  request.tv_sec = 0;
     18  request.tv_nsec = 100000;
    1419
    1520  /* send cmd (stdout / stderr) */
     
    2732      line = memstr (buffer[0].buffer, PCLIENT_PROMPT, buffer[0].Nbuffer);
    2833    }
    29     if (status == -1) usleep (10000);
     34    if (status == -1) nanosleep (&request, &remain);
    3035  }
    3136  if (status ==  0) return (PCLIENT_DOWN);
Note: See TracChangeset for help on using the changeset viewer.