WindowsGSM / SteamCMD.ConPTY

Real-time output from SteamCMD with Pseudo Console (ConPTY)
MIT License
12 stars 2 forks source link

OutputDataReceived not Firing #2

Open MypowerHD opened 2 years ago

MypowerHD commented 2 years ago

Version = .Net 6 VSS = VSS22

Hi there, We've been stuck with the problem for a few days now that the SteamCMD doesn't flush its buffer after the end of the line, but whenever the standard buffer of 4096 is full. This behavior is standard when an application is not interactive.

Even with the correct ConPTY from Microsoft, he still detected the application as non-interactive for inexplicable reasons. This is where your lib comes into play, we just wanted to see if it works with your lib now, but here I get no output at all, attached is a small POC.

Unfortunately, I'm currently too tired to get down to it, maybe you'll find something out in time.

https://github.com/MypowerHD/Poc.SteamCMD---ConPTY

Greetings Timo.

BattlefieldDuck commented 2 years ago

I had viewed your Poc.SteamCMD---ConPTY repo, your program stop immediately after Console.WriteLine("Hello, World!");.

You need to add

Process p = Process.GetProcessById(processInfo.dwProcessId);
p.WaitForExit();

after the steamCMDConPTY.Start();