completed = true;
if (wait_handle != null)
wait_handle.Set ();
- Flush (true);
+ FlushLast ();
return;
}
}
}
+ void FlushLast ()
+ {
+ Flush (true);
+ if (err_out) {
+ process.OnOutputDataReceived (null);
+ } else {
+ process.OnErrorDataReceived (null);
+ }
+ }
+
void Flush (bool last)
{
if (sb.Length == 0 ||