Skip to content

Commit

Permalink
Flush stdout at end of execution since it's not automatically flushed…
Browse files Browse the repository at this point in the history
… when piped to files on Linux

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@17004 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Sep 1, 2013
1 parent 1b2d4d0 commit 31a73c9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Compiler/Template/CodegenC.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -9752,6 +9752,7 @@ int rml_execution_failed(mmc_GC_local_state_type local_GC_state)
mmc_GC_undo_roots_state(local_GC_state);
fflush(NULL);
fprintf(stderr, "Execution failed!\n");
fflush(NULL);
return 1;
}

Expand Down Expand Up @@ -9779,12 +9780,14 @@ int main(int argc, char **argv)
rml_execution_failed(local_GC_state);
fprintf(stderr, "Stack overflow detected and was not caught.\nSend us a bug report at <%url%>\n Include the following trace:\n");
printStacktraceMessages();
fflush(NULL);
return 1;
MMC_CATCH_STACK()
MMC_CATCH_TOP(return rml_execution_failed(local_GC_state));
}

fflush(NULL);
return 0;
}
>>
Expand Down

0 comments on commit 31a73c9

Please sign in to comment.