windows - Redirect of output to file not working when process/command is -


i redirect ouput .exe file txt-file.

this enter:

app.exe -options -moreoptions > "c:\logs\log.txt" 

afterwards, given log file created not written...at first. if terminate app.exe after minutes or hours log file filled output process since beginng - however, if terminate process. app.exe process listens port , takes incoming messages , forwards process. means, needs run time , can't terminate see logs. also, need logs in real time written file...

because logs written exe seems write stdout. redirected every output channel 2 (error) 9 (customs) stdout testing same result.

does windows redirect output when command (here: exe) finished? there way write output file if command still running?

i guess, output buffered , therefore not written file, till buffer full or command exits. there way disable buffer? (i don't have access source code!)

thank in advance!


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -