IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 33544


Ignore:
Timestamp:
Mar 16, 2012, 7:54:57 AM (14 years ago)
Author:
eugene
Message:

close the pipes when remove dvo clients are finished

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20111122/Ohana/src/libdvo/src/HostTable.c

    r33539 r33544  
    301301        // check on the status of this and report any output?
    302302        fprintf (stdout, "job finished for %s (%d)\n", host->hostname, pid);
    303         close (host->stdio[HOST_STDIN]);
    304303
    305304        // read stdout
     
    308307        write (STDOUT_FILENO, host->stdout.buffer, host->stdout.Nbuffer);
    309308        FlushIOBuffer (&host->stdout);
    310         close (host->stdio[HOST_STDOUT]);
    311309        fprintf (stdout, "\n");
    312310           
     
    316314        write (STDOUT_FILENO, host->stderr.buffer, host->stderr.Nbuffer);
    317315        FlushIOBuffer (&host->stderr);
    318         close (host->stdio[HOST_STDERR]);
    319316        fprintf (stdout, "\n");
    320317
     
    343340
    344341escape:
     342
     343  // close all opened connections
     344  for (i = 0; i < table->Nhosts; i++) {
     345    if (!table->hosts[i].pid) continue; // any unconnected hosts should be skipped
     346    close (table->hosts[i].stdio[HOST_STDIN]);
     347    close (table->hosts[i].stdio[HOST_STDOUT]);
     348    close (table->hosts[i].stdio[HOST_STDERR]);
     349  }
     350
    345351  return globalStatus;
    346352}
Note: See TracChangeset for help on using the changeset viewer.