Click here to Skip to main content
15,910,118 members
Home / Discussions / C#
   

C#

 
GeneralRe: Execute And wait Pin
JDM67631-Dec-10 6:10
JDM67631-Dec-10 6:10 
GeneralRe: Execute And wait Pin
Jacob D Dixon1-Dec-10 7:26
Jacob D Dixon1-Dec-10 7:26 
GeneralRe: Execute And wait Pin
JDM67631-Dec-10 8:09
JDM67631-Dec-10 8:09 
GeneralRe: Execute And wait Pin
Jacob D Dixon1-Dec-10 8:33
Jacob D Dixon1-Dec-10 8:33 
GeneralRe: Execute And wait [modified] Pin
JDM67631-Dec-10 9:49
JDM67631-Dec-10 9:49 
GeneralRe: Execute And wait Pin
Jacob D Dixon1-Dec-10 11:05
Jacob D Dixon1-Dec-10 11:05 
GeneralRe: Execute And wait Pin
Dalek Dave3-Dec-10 5:35
professionalDalek Dave3-Dec-10 5:35 
AnswerRe: Execute And wait Pin
Luc Pattyn1-Dec-10 6:06
sitebuilderLuc Pattyn1-Dec-10 6:06 
JDM6763 wrote:
_errorMessage = p.StandardError.ReadToEnd();
p.WaitForExit();


this sequence doesn't make much sense: ReadToEnd returns what is currently available without waiting, so waiting for the process end after that is meaningless. One way to fix things is first wait for end of process, then ReadToEnd on both streams. Alternatives with events or extra threads would allow to capture (lots of) output while the process is still running.

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.


modified on Wednesday, December 1, 2010 12:34 PM

AnswerRe: Execute And wait Pin
PIEBALDconsult1-Dec-10 8:08
mvePIEBALDconsult1-Dec-10 8:08 
GeneralRe: Execute And wait Pin
JDM67631-Dec-10 8:14
JDM67631-Dec-10 8:14 
Questionregistration form Pin
AISIDA AKINWALE MAYOMI1-Dec-10 3:34
AISIDA AKINWALE MAYOMI1-Dec-10 3:34 
AnswerRe: registration form Pin
Pete O'Hanlon1-Dec-10 3:43
mvePete O'Hanlon1-Dec-10 3:43 
AnswerRe: registration form Pin
Henry Minute1-Dec-10 3:45
Henry Minute1-Dec-10 3:45 
AnswerRe: registration form Pin
musefan1-Dec-10 3:54
musefan1-Dec-10 3:54 
QuestionWindows Tab Control Flickering Pin
vishnukamath1-Dec-10 1:37
vishnukamath1-Dec-10 1:37 
AnswerRe: Windows Tab Control Flickering Pin
Abhinav S1-Dec-10 1:42
Abhinav S1-Dec-10 1:42 
QuestionSwitching on type Pin
creatiive30-Nov-10 23:44
creatiive30-Nov-10 23:44 
AnswerRe: Switching on type Pin
phil.o1-Dec-10 0:01
professionalphil.o1-Dec-10 0:01 
AnswerRe: Switching on type Pin
Pete O'Hanlon1-Dec-10 0:49
mvePete O'Hanlon1-Dec-10 0:49 
AnswerRe: Switching on type Pin
musefan1-Dec-10 1:01
musefan1-Dec-10 1:01 
GeneralRe: Switching on type Pin
creatiive1-Dec-10 2:34
creatiive1-Dec-10 2:34 
GeneralRe: Switching on type Pin
musefan1-Dec-10 2:55
musefan1-Dec-10 2:55 
AnswerRe: Switching on type Pin
Keith Barrow1-Dec-10 1:18
professionalKeith Barrow1-Dec-10 1:18 
GeneralRe: Switching on type Pin
musefan1-Dec-10 1:24
musefan1-Dec-10 1:24 
GeneralRe: Switching on type Pin
Keith Barrow1-Dec-10 1:52
professionalKeith Barrow1-Dec-10 1:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.