🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #3999

Re: Create Process and dying parents...

#3999
From: Remy Lebeau (TeamB)
Date: Thu, 30 Mar 2006 22:15
18 lines
1508 bytes
"peter" <pnandrus@attglobal.net> wrote in message
news:442c3cf4$1@newsgroups.borland.com...

> if I use CreateProcess in process A to create process B, how
> can I make sure B exits if A is shut down?

That depends on whether A is being shut down gracefully or unexpectedly.

If gracefully, then A can simply notify B to shut itself down.  How you do
that depends on what B actually is.

If unexpectedly, then the only way I can think of right now is to have A
pass its process ID as a command line parameter when launching B, and then
have B periodically check if that ID is still running.


Gambit
Technical Details
Message-ID: <442c59a6$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <442c3cf4$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,5f01f131eb370203
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <442c3cf4$1@newsgroups.borland.com>
Subject: Re: Create Process and dying parents...
Date: Thu, 30 Mar 2006 14:15:20 -0800
Lines: 20
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 68.69.17.41
Message-ID: <442c59a6$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1143757222 68.69.17.41 (30 Mar 2006 14:20:22 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail