Changeset 24624
- Timestamp:
- 2011-09-21T15:59:57+12:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gs2-extensions/parallel-building/trunk/src/src/mpibuildcol-src/mpibuildcol.cpp
r24589 r24624 415 415 TiXmlText* text_command = text_grandchild->ToText(); 416 416 stringstream commandstrstr; 417 commandstrstr << text_command->Value() ;417 commandstrstr << text_command->Value() << " 2>&1"; 418 418 // - and create the new task given the command string and 419 419 // accounting for any preqrequisites via the the parent task id … … 480 480 message += command; 481 481 debugPrint(worker_id, message); 482 system(command); // asynchronous 482 // asynchronous 483 //system(command); 484 FILE *pipe = popen(command, "r"); 485 if (!pipe) 486 { 487 cerr << "Warning! Failed to open pipe to command: " << command << endl; 488 } 489 else 490 { 491 char buffer[1024]; 492 while(fgets(buffer, sizeof(buffer), pipe) != NULL) 493 { 494 cout << buffer; 495 } 496 pclose(pipe); 497 } 483 498 // 2. Send a reply back containing the id of the task just completed 484 499 debugPrint(worker_id, "complete");
Note:
See TracChangeset
for help on using the changeset viewer.