Re: Process Fails while calling Start
- From: "Willy Denoyette [MVP]" <willy.denoyette@xxxxxxxxxx>
- Date: Wed, 31 Jan 2007 12:52:29 +0100
"Anbu" <Anbu.Thangarathinam@xxxxxxxxx> wrote in message news:1170233654.511179.298800@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi all,
I'm creating processes of a console based application. After
proc.Start() the process is not getting terminated and the thread
keeps waiting for some reponse from the process. Now I need to kill
the process if it takes more time.
Process proc = new Process();
proc.StartInfo.FileName = "application";
proc.StartInfo.WorkingDirectory = workingdir;
proc.StartInfo.Arguments = " args1 arg2";
proc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
logger.Debug("Parameters used : " + proc.StartInfo.Arguments);
proc.Start();
proc.WaitForExit();
proc.Dispose();
The process is started when the control reaches proc.Start(). Hope the
control should move to the next statement proc.WaitForExit() and wait
until the process gets completed. The control is not moving out of the
statement.
When I look at the threads from .NET IDE, I could see a thread still
active for this call. No further execution is allowed from this point.
Any clue why this is failing?
How can I do this? Otherwise I need to terminate those threads if
running for more time.
Thanks
Why starting a new thread while this same question has been answered in another thread of yours?
Willy.
.
- References:
- Process Fails while calling Start
- From: Anbu
- Process Fails while calling Start
- Prev by Date: Re: Get Culture Info from Language Name
- Next by Date: Handle the joystick with events (DirectInput and C#)
- Previous by thread: Re: Process Fails while calling Start
- Next by thread: Clipboard events in windows service
- Index(es):
Relevant Pages
|
|