Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #10334

Re: Terminating an application which runs in the background

Path csiph.com!weretis.net!feeder4.news.weretis.net!feeder5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From Karl Wochele <kw@ecos-system.invalid>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: Terminating an application which runs in the background
Date Thu, 23 Mar 2017 11:20:18 +0100
Organization solani.org
Lines 26
Message-ID <ob07h2$utp$1@solani.org> (permalink)
References <0c459c45-4199-4fd7-acac-e6c5f2e66b58@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 8bit
X-Trace solani.org 1490264418 31673 eJwFwYEBwCAIA7CXrEDRc5DR/09YEkaw0xn0UGic9yG6nss+bbKw6MjVtQ+ZHOiGjpZs0D8aeBEF (23 Mar 2017 10:20:18 GMT)
X-Complaints-To abuse@news.solani.org
NNTP-Posting-Date Thu, 23 Mar 2017 10:20:18 +0000 (UTC)
User-Agent Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
Cancel-Lock sha1:hrzmFj8RltwYCclBAO1++q5ujqs=
X-NNTP-Posting-Host eJwNyMEBwCAMAsCVpAGM40Rt9h+hvecpDJ9Jy1SrTwyMEvnm3awtRD9O3PL4K3t1QSubkwjwAxc1EJ0=
X-User-ID eJwFwQkBACAIBLBK/IdxEKF/BDfX4GhYeJivLyOvvF6aqRrRUa98TFi7BAPA0rFdjVNi5wMrVhFd
In-Reply-To <0c459c45-4199-4fd7-acac-e6c5f2e66b58@googlegroups.com>
Xref csiph.com comp.lang.clipper.visual-objects:10334

Show key headers only | View raw


Hi Stefan,

start app b from app a with a commandline parameter:
ntrim(GetCurrentProcessId())

in app b:
pHandle := OpenProcess(PROCESS_ALL_ACCESS,FALSE,val(cProcessId))

with a timer you can check:

local dwExit as dword
If GetExitCodeProcess(pHandle,@dwExit)
	if dwExit <> STILL_ACTIVE
		Quit()
	endif
endif

HTH,
Karl

Am 23.03.2017 um 08:17 schrieb Stefan Überbacher:
> Hi,
>
> 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.
>

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Terminating an application which runs in the background Stefan Überbacher <info@sanosoft.com> - 2017-03-23 00:17 -0700
  Re: Terminating an application which runs in the background "Wolfgang Riedmann" <wriedmann@gmail.com> - 2017-03-23 08:51 +0100
    Re: Terminating an application which runs in the background Stefan Überbacher <info@sanosoft.com> - 2017-03-23 01:10 -0700
      Re: Terminating an application which runs in the background "Wolfgang Riedmann" <wriedmann@gmail.com> - 2017-03-23 09:48 +0100
        Re: Terminating an application which runs in the background Stefan Überbacher <info@sanosoft.com> - 2017-03-23 02:30 -0700
          Re: Terminating an application which runs in the background "Wolfgang Riedmann" <wriedmann@gmail.com> - 2017-03-24 08:20 +0100
            Re: Terminating an application which runs in the background Karl Wochele <kw@ecos-system.invalid> - 2017-03-24 09:02 +0100
              Re: Terminating an application which runs in the background "Wolfgang Riedmann" <wriedmann@gmail.com> - 2017-03-24 09:17 +0100
              Re: Terminating an application which runs in the background "Wolfgang Riedmann" <wriedmann@gmail.com> - 2017-03-24 09:24 +0100
                Re: Terminating an application which runs in the background Karl Wochele <kw@ecos-system.invalid> - 2017-03-24 10:05 +0100
                Re: Terminating an application which runs in the background "Wolfgang Riedmann" <wriedmann@gmail.com> - 2017-03-24 10:29 +0100
            Re: Terminating an application which runs in the background Stefan Überbacher <info@sanosoft.com> - 2017-03-28 00:10 -0700
              Re: Terminating an application which runs in the background "Wolfgang Riedmann" <wriedmann@gmail.com> - 2017-03-28 09:54 +0200
                Re: Terminating an application which runs in the background Stefan Überbacher <info@sanosoft.com> - 2017-03-28 04:09 -0700
                Re: Terminating an application which runs in the background "Wolfgang Riedmann" <wriedmann@gmail.com> - 2017-03-28 14:28 +0200
  Re: Terminating an application which runs in the background Guy Deprez <dpzguy@skynet.be> - 2017-03-23 09:20 +0100
  Re: Terminating an application which runs in the background Karl Wochele <kw@ecos-system.invalid> - 2017-03-23 11:20 +0100
    Re: Terminating an application which runs in the background Stefan Überbacher <info@sanosoft.com> - 2017-03-23 03:54 -0700

csiph-web