blaze.cc: add missing fflush(3) before execve(2)
When calling `bazel run` the command itself is executed by the
client. As an execve(2) replaces the program image, including
all buffered IO, flush all streams first. This will ensure that
the "Running command line" message is actually printed.
@@ -1915,6 +1915,10 @@ unsigned int GrpcBlazeServer::Communicate() {
<< "changing directory into " << request.working_directory()
<< " failed: " << GetLastErrorString();
}
+
+ // Execute the requested program, but before doing so, flush everything
+ // we still have to say.
+ fflush(NULL);
ExecuteProgram(request.argv(0), argv);
}
