IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 4, 2006, 2:19:21 AM (20 years ago)
Author:
eugene
Message:

adding task options

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/pantasks/JobOps.c

    r7917 r8129  
    103103  job[0].argv[i] = 0;
    104104
     105  /* we need our own copy of task[0].optv: optc is the number of valid opts.  */
     106  job[0].optc = task[0].optc;
     107  ALLOCATE (job[0].optv, char *, MAX (task[0].optc, 1));
     108  for (i = 0; i < job[0].optc; i++) {
     109    job[0].optv[i] = strcreate (task[0].optv[i]);
     110  }
     111
    105112  /* Other data from the task is needed by the job. We carry a pointer back to the task.  Changes to an
    106113     executing task are applied to the existing jobs (exit macros, poll_period, timeout) */
     
    136143  free (job[0].argv);
    137144
     145  for (i = 0; i < job[0].optc; i++) {
     146    free (job[0].optv[i]);
     147  }
     148  free (job[0].optv);
     149
    138150  FreeIOBuffer (&job[0].stdout);
    139151  FreeIOBuffer (&job[0].stderr);
Note: See TracChangeset for help on using the changeset viewer.