Fix multiple-output to stdout bug.
[pintos-anon] / grading / lib / Pintos / Grading.pm
index 36599a0afbdd9957374843f0d50ee314d629a52c..c2072a4f1c4714eb85a5f00e168f259c9698f4b5 100644 (file)
@@ -16,6 +16,11 @@ use POSIX;
 use Getopt::Long qw(:config no_ignore_case);
 use Algorithm::Diff;
 \f
+# We execute lots of subprocesses.
+# Without this, our stdout output can get flushed multiple times,
+# which is harmless but looks bizarre.
+$| = 1;
+
 sub parse_cmd_line {
     my ($do_regex, $no_regex);
     GetOptions ("v|verbose+" => \$verbose,