I have a console based c app . I am executing it from c# silently using Redirecting Standard Output and doing it synchronously which works fine. Now i want to do it in asynch manner which is giving output like synch manner. i.e OutPutDataRecieved event is fired but only after the console app(exe) finishes.OutputDataRecieved event is fired for each line after finish, not instantly as soon as it gets a line in output.
The code for asynch works for CMD.exe etc ,So,I am sure its c based app having problem in output. FYI:The output in c console is done using printf. Based on my findings: I think c console app is not giving output/writing to stdout until it finishes its execution. I tried setting buffer to null or flushing after every printf but none works.
Any tricks??