Unexpected bugs in the parser, engine or in procedures can cause crashes
in the GUI. If the journal is not flushed *before* running the syntax, then
no record of that syntax exists, and the bug can be hard to reproduce.
This change ensures that the syntax is written to the journal before it is
processed.
}
fprintf (j->file, "%s\n", s);
+
+ /* Flush the journal in case the syntax we're about to write
+ causes a crash. Having the syntax already written to disk
+ makes postmortem analysis of the problem possible. */
+ fflush (j->file);
}
static void