none
Using ProcessStartInfo.RedirectStandardInput times out / slows in .net 2.0 (works in .net 1.1) RRS feed

  • Question

  • Have an application (lets call it 'A') that uses Process.Start() to call another application (lets call it 'B').

    Application 'B' is written in .net 2.0 and does some dynamic compiling on the fly (VBCodeProvider etc).

    In application 'A' we have set ProcessStartInfo.RedirectStandardInput to true. This whole scenario runs fine when application 'A' is compiled in .net 1.1 but as soon as we upgrade application 'A' to .net 2.0 it causes problems. These problems include timeouts or application 'B' takes significantly longer to run (ie 10 sec program can now take 5 minutes).

    We have discovered that if we change ProcessStartInfo.RedirectStandardInput to false (in application 'A') after we upgrade application 'A' to .net 2.0 then everything works fine again.

    Is there a bug in .net 2.0 with regards to processes ?

    Any help appreciated.

    Cheers Paul
    Wednesday, December 23, 2009 3:21 AM

Answers

  • Read up on the documentation of RedirectStandardInput especially the part about deadlocks.
    • Marked as answer by eryang Wednesday, December 30, 2009 2:54 AM
    Wednesday, December 23, 2009 3:04 PM