c# - Redirect stdout, but stdout still appears -
i'm spawning child processes process.start. both process , child process console apps. stdout child process shows in parent console window. avoid this, redirected stdout, output still appearing. setup looks this:
var proc = process.start(new processstartinfo { redirectstandardinput = true, redirectstandardoutput = true, redirectstandarderror = true, useshellexecute = false, filename = filename, arguments = args, createnowindow = false }); var stderr = proc.standarderror.readtoendasync(); var stdout = proc.standardoutput.readtoendasync(); var stdin = proc.standardinput.writeasync(stdintext).continuewith(something => proc.standardinput.close()); proc.waitforexit(); task.waitall(stderr, stdout, stdin); // process output
i don't write stdout own stdout, it's still appearing in parent console. seems occur child processes , not others. don't have source tool being run here. how can stop output occurring?
Comments
Post a Comment