On 8/24/2011 6:41 AM, Maksym Pavlenko wrote:
> I'm working on update system for c# app.
> It has two independed modules - exe app itself, which is always running and update service, which sometimes check for the new versions, make backups, downloading archives, etc.
> The problem is that I need to correctly kill exe app safely at idle (don't break any operations) from service. How can I do it? Could somebody help me?
There are many ways of doing that.
I would:
- add a global flag exitWhenConvenient in app
- modify app logic to respect
- make app a remoting server exposing the ability to change the flag
- make the updater a remoting client that calls the server
- let the client wait until process is gone
It should not require that much code.
Arne
PS: WCF is better than remoting, but it is also more complex, so
unless you know WCF then I suggest using old fashioned remoting.
|