Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Wolfgang Riedmann" Newsgroups: comp.lang.clipper.visual-objects Subject: Re: Terminating an application which runs in the background Date: Thu, 23 Mar 2017 08:51:38 +0100 Lines: 34 Message-ID: References: <0c459c45-4199-4fd7-acac-e6c5f2e66b58@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Trace: individual.net fe3DNEaYcJwt4bBNRo67NglaD/DsBCSiS2W7k7CymnCRdmppc= Cancel-Lock: sha1:ixRNKLxAQ8gb0RojvQrlr7uKJf8= User-Agent: XanaNews/1.18.1.6 Xref: csiph.com comp.lang.clipper.visual-objects:10327 Hi Stefan, > application a calls application b, which runs in the background and > is terminated when the user exits the application a. But when > application a is terminated as a result of a runtime error, > application b is still running. I'm searching for a solution that > ensures that application b is always terminated when application a > terminates. this is possible with the Process API. You can search for a process with the name you know and terminate it. I suppose you need this for a VO application and not for a .NET one? With .NET this would be easier than with VO. Unfortunately, I cannot add an attachment here, but you can find it here: https://riedmann.it/download/RestartApp.zip You'll find a small AEF that I'm using to restart an application when updating itself. But please beware: this application is not tested on a terminal server (in fact I'm pretty sure it will behave not well there as they could be different processes with the same name with different users). Wolfgang --