IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 3, 2005, 5:50:08 PM (21 years ago)
Author:
eugene
Message:

psched / pscontrol / pclient dev work

File:
1 edited

Legend:

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

    r4693 r4705  
    5050  int i;
    5151
     52  fprintf (stderr, "\n");
    5253  if (Njobs == 0) {
    53     fprintf (stderr, "no defined jobs\n");
     54    fprintf (stderr, " no defined jobs\n");
    5455    return;
    5556  }
    5657
     58  fprintf (stderr, " Jobs\n");
    5759  for (i = 0; i < Njobs; i++) {
    58     fprintf (stderr, "%d: %-15s %5d %20s (%lx)\n", Njobs, jobs[i][0].task[0].name, jobs[i][0].JobID, jobs[i][0].argv[0], (long) jobs[i][0].argv);
     60    fprintf (stderr, " %d: %-15s %5d %20s (%lx)\n", Njobs, jobs[i][0].task[0].name, jobs[i][0].JobID, jobs[i][0].argv[0], (long) jobs[i][0].argv);
    5961  }
    6062  return;
     
    7678  }
    7779
    78   /* we need our own copy of task[0].argv
    79    *  argc is the number of valid args, like the usual command line.
    80    *  we allocate one extra element, with value 0 to be passed to execvp
     80  /* we need our own copy of task[0].argv argc is the number of valid args, like the usual command line.  we
     81   *  allocate one extra element, with value 0 to be passed to execvp
    8182   */
    8283  job[0].argc = task[0].argc;
     
    8788  job[0].argv[i] = 0;
    8889
    89   /* other data from the task is needed by the job
    90      we carry a pointer back to the task.  this means we
    91      cannot modify the task once a job is created, or the changes will
    92      be applied to the existing jobs */
     90  /* Other data from the task is needed by the job. We carry a pointer back to the task.  Changes to an
     91     executing task are applied to the existing jobs (exit macros, poll_period, timeout) */
    9392
    9493  job[0].task = task;
    9594 
    96   /* if we decide we need to be able to dynamically set task qualities
    97      (like host, timeouts, etc), the we will need to have matched
    98      entries to these quantites in the job structure */
     95  /* if we decide we need to be able to dynamically set task qualities (like host, timeouts, etc), the we will
     96     need to have matched entries to these quantites in the job structure */
    9997
    10098  jobs[Njobs] = job;
     
    122120}
    123121
    124 /** are we deleting the active job?? **/
     122/* delete the job from the job list & adjust ActiveJob counter */
    125123int DeleteJob (Job *job) {
    126124
     
    140138
    141139  FreeJob (jobs[Nm]);
    142   for (i = Nm + 1; i < Njobs; i++)
    143     jobs[i - 1] = jobs[i];
     140  for (i = Nm; i < Njobs - 1; i++) {
     141    jobs[i] = jobs[i + 1];
     142  }
    144143  Njobs --;
    145144
Note: See TracChangeset for help on using the changeset viewer.