Re: c# - Detecting external process shut down from console application
- From: Jamal Mazrui <empower@xxxxxxxxx>
- To: programmingblind@xxxxxxxxxxxxx
- Date: Wed, 30 Jan 2008 20:40:53 -0500 (EST)
Perhaps I missed it, what are you expecting to happen, what is happening
instead, and what error message, if any, are you getting?
Jamal
On Thu, 31 Jan
2008, Mohammed Adeel wrote:
> Date: Thu, 31 Jan 2008 00:30:27 +0000 (GMT)
> From: Mohammed Adeel <licenced2chill@xxxxxxxxxxx>
> Reply-To: programmingblind@xxxxxxxxxxxxx
> To: programmingblind@xxxxxxxxxxxxx
> Subject: c# - Detecting external process shut down from console
> application
>
> Hi,
> I've got a console application written in C#.
> I'm launching an external program from my application which is working fine
> but I'd like to be able to detect when the program I've started shuts down.
> This is the code I've got. i've put it in the main method of the app:
> Process UT2K4 = new Process();
> UT2K4.StartInfo.FileName = "c:\\ut2004\\system\\ut2004.exe";
> UT2K4.StartInfo.Arguments = "-mod=AudioUT2K4";
> UT2K4.Exited += new EventHandler( app.uT2K4Process_Exited);
> UT2K4.Start();
> and this is the method for the exit handler:
> private void uT2K4Process_Exited(object sender, EventArgs e) {
> Console.WriteLine ("ut2k4 shutdown");
> Log.Write("user exited TTS server");
> TTS.Speak("exiting", true);
> }
>
>
> ---------------------------------
> Sent from Yahoo! - a smarter inbox.
__________
View the list's information and change your settings at
http://www.freelists.org/list/programmingblind
- References:
- c# - Detecting external process shut down from console application
- From: Mohammed Adeel
Other related posts:
- » c# - Detecting external process shut down from console application
- » Re: c# - Detecting external process shut down from console application
- c# - Detecting external process shut down from console application
- From: Mohammed Adeel