Skip to content

Output blocking for Sub-Processes #100

@AnakinRaW

Description

@AnakinRaW

when running another program the current impl. "blocks" the input stream. Effect is that all messages will only be written to console when the process finished.

Expected behaviour: Write messages as soon as they created.

Fix

// ProcessRunner.cs:Start(ProcessStartInfo startInfo)
_process.OutputDataReceived += OnDataReceived;
_process.ErrorDataReceived += OnDataReceived;
_process.Start();
_process.BeginOutputReadLine();
//REMOVE Console.Out.WriteLine(_process.StandardOutput.ReadToEnd());

static void OnDataReceived(object sender, DataReceivedEventArgs e)
{
    Console.WriteLine(e.Data);
}

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions