Skip to content

Commit

Permalink
Adjustments to launch script
Browse files Browse the repository at this point in the history
  • Loading branch information
lhstrh committed Dec 22, 2023
1 parent 7413efb commit 03259d8
Showing 1 changed file with 4 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -197,26 +197,18 @@ public void doGenerate(List<FederateInstance> federates, RtiConfig rtiConfig) {
.append("\n");
}
}
if (host.equals("localhost") || host.equals("0.0.0.0")) {
// Local PID managements
shCode.append(
"echo \"#### Bringing the RTI back to foreground so it can receive Control-C.\"" + "\n");
shCode.append("fg %1" + "\n");
}
// Wait for launched processes to finish
shCode
.append(
String.join(
"\n",
"echo \"RTI has exited. Wait for federates to exit.\"",
"# Wait for launched processes to finish.",
"# The errors are handled separately via trap.",
"EXITED_SUCCESSFULLY=true",
"wait $RTI || EXITED_SUCCESSFULLY=false",
"for pid in \"${pids[@]}\"",
"do",
" wait $pid || exit $?",
" wait $pid || EXITED_SUCCESSFULLY=false",
"done",
"echo \"All done.\"",
"EXITED_SUCCESSFULLY=true"))
"echo \"All done.\""))
.append("\n");

// Create bin directory for the script.
Expand Down

0 comments on commit 03259d8

Please sign in to comment.