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

From Karl Wochele <kw@ecos-system.invalid>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: Terminating an application which runs in the background
Date 2017-03-23 11:20 +0100
Organization solani.org
Message-ID <ob07h2$utp$1@solani.org> (permalink)
References <0c459c45-4199-4fd7-acac-e6c5f2e66b58@googlegroups.com>

Show all headers | 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