I may be wrong, but isn't ReadLine() on another process' stdout blocking? So when you do (stdout.ReadLine() && stderr.ReadLine()), your code blocks on stdout, and meanwhile the process writes something to stderr (but not to stdout) - so you don't see it.

By on 10/24/2008 5:09 AM ()

Yep, I think your right.

I found the best approach is to use a separate thread to read from standard out/error. I do something like this in the sharpdevelop integration. It's open source, so you can download it and take a look at my implementation:

[link:www.icsharpcode.net]

Cheers,

Rob

By on 10/24/2008 5:52 AM ()

Wrote the code for it. The separate thread thing works like a charm. Before I wasn't having blocking issues because my strErr stream variable was just pointing to stdout (on accident). But when I changed it sure enough I had the blocking issue you mentioned I would have. Now I have a working textbox component that reads the output from fsi. I plan on incorporating it into one of our test tools at work.

By on 10/27/2008 11:37 AM ()

Well, I do do this on a separate thread from the mainthread, but what you're saying is that I should have 2 separate threads for stdout aswell as stderr rather than just one. I will give it a try.

Thanks Rob

By on 10/24/2008 10:59 AM ()

Anyone know?

By on 10/23/2008 9:46 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper