🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Create Process and dying parents...

#4008
From: peter
Date: Fri, 31 Mar 2006 14:06
32 lines
1780 bytes

What's the easiest way to check if a certain process is still
alive once I have the process ID?

thanks for the info. i hadn't even thought of that simple a 
solution.... =)




"Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> wrote:
>
>"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: <442d4576$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news4.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> <442c59a6$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: "peter" <pnandrus@attglobal.net>
Sender: "peter" <pnandrus@attglobal.net>
Reply-To: "peter" <pnandrus@attglobal.net>
Subject: Re: Create Process and dying parents...
Newsgroups: borland.public.cppbuilder.nativeapi
X-User-Info: 67.111.241.190     
References: <442c3cf4$1@newsgroups.borland.com> <442c59a6$1@newsgroups.borland.com>
NNTP-Posting-Host: 207.105.83.66
Message-ID: <442d4576$1@newsgroups.borland.com>
Date: 31 Mar 2006 07:06:30 -0700
X-Trace: newsgroups.borland.com 1143817590 207.105.83.66 (31 Mar 2006 07:06:30 -0700)
Lines: 33
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news4.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