IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 18160 for trunk/Ohana


Ignore:
Timestamp:
Jun 17, 2008, 9:00:33 AM (18 years ago)
Author:
eugene
Message:

close job fds if they are not -1

File:
1 edited

Legend:

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

    r16451 r18160  
    1616}
    1717
     18/* free all jobs, only used on shutdown */
    1819void FreeJobs () {
    1920  int i;
     
    159160  if (task[0].stderr_dump != NULL) job[0].stderr_dump = strcreate (task[0].stderr_dump);
    160161
     162  job[0].stdout_fd = -1;
     163  job[0].stderr_fd = -1;
     164
    161165  jobs[Njobs] = job;
    162166  Njobs ++;
     
    185189  }
    186190  free (job[0].optv);
     191
     192  if (job[0].stdout_fd >= 0) close (job[0].stdout_fd);
     193  if (job[0].stderr_fd >= 0) close (job[0].stderr_fd);
    187194
    188195  if (job[0].stdout_dump != NULL) free (job[0].stdout_dump);
Note: See TracChangeset for help on using the changeset viewer.