Changeset 35091 for branches/eam_branches/ipp-20121219
- Timestamp:
- Feb 6, 2013, 11:12:46 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20121219/Ohana/src/libdvo/src/HostTable.c
r33963 r35091 243 243 Nmax ++; 244 244 245 // need the list of connected hosts for exit test below 246 int Nrunning = 0; 247 for (i = 0; i < table->Nhosts; i++) { 248 if (!table->hosts[i].pid) continue; // any unconnected hosts should be skipped 249 Nrunning ++; 250 } 251 245 252 int Nfound = 0; 246 253 … … 262 269 // we have some sockets to check, check sockets for all hosts 263 270 for (i = 0; (status > 0) && (i < table->Nhosts); i++) { 271 if (!table->hosts[i].pid) continue; // any unconnected hosts should be skipped 272 264 273 if (FALSE && FD_ISSET (table->hosts[i].stdio[HOST_STDIN], &wtSet)) { 265 274 // this host is waiting for input : this is an error, so exit … … 268 277 } 269 278 270 if ( FD_ISSET (table->hosts[i].stdio[HOST_STDOUT], &rdSet)) {279 if ((table->hosts[i].stdio[HOST_STDOUT] > 0) && FD_ISSET (table->hosts[i].stdio[HOST_STDOUT], &rdSet)) { 271 280 // this host has waiting output : read to buffer, and dump if necessary 272 281 ReadtoIOBuffer (&table->hosts[i].stdout, table->hosts[i].stdio[HOST_STDOUT]); … … 282 291 } 283 292 284 if ( FD_ISSET (table->hosts[i].stdio[HOST_STDERR], &rdSet)) {293 if ((table->hosts[i].stdio[HOST_STDERR] > 0) && FD_ISSET (table->hosts[i].stdio[HOST_STDERR], &rdSet)) { 285 294 // this host has waiting output : read to buffer, and dump if necessary 286 295 ReadtoIOBuffer (&table->hosts[i].stderr, table->hosts[i].stdio[HOST_STDERR]); … … 361 370 } 362 371 Nfound ++; 363 if (Nfound == table->Nhosts) goto escape; // we've harvested all jobs372 if (Nfound == Nrunning) goto escape; // we've harvested all jobs 364 373 } 365 374 }
Note:
See TracChangeset
for help on using the changeset viewer.
