SPUG: kill or exit multiple processes

Meryll Larkin humbaba9 at yahoo.com
Tue Aug 27 10:59:40 CDT 2002


8/27/02

Now I'm confused because I assumed that if Program B spawned Program C
that Program B's PID (process ID) would be the PPID (parent process ID)
to Program C.

I also thought that if Program B was killed, that killing the parent
would kill the child (Program C).

In which case, wouldn't it be easier to just have Program B check for a
condition (created by Program A - like the existance of a file or
something) after Program C completed and exit itself if that condition
was true? 

Or am I missing something here?  If so, please correct me!

Meryll Larkin


--- "Baker, Stephen M" <stephen.m.baker at intel.com> wrote:
> 
> 
> I'm looking for the correct exit command for the following situation:
> 
> Program A coninuously checks environment conditions and runs Program
> B as
> necessary.
> 
> Each time Program B runs, it spawns multiple instances of program C.
> 
> Eventually, Programs B and C complete execution, modify the
> environment, and
> Program A again notices changes and restarts the cycle.
> 
> I have the program catching signal interrupts for exit purposes, but
> I don't
> know whether to go with a kill 9, an exit(?), or what.
> 
> What I want to do when exit is called is kill all instances of
> programs A
> and B, but not any occurances of program C.
> 
> 
> 
> 
> Stephen Baker				Office:	253.371.4188
> Intel Corporation				Mobile:	253.678.0556 
> Intel Architecture Group			Email:
> stephen.m.baker at intel.com
> 
> Mail Stop DP3-307	2800 Center Dr.		Dupont, WA 98327
> 
>
****************************************************************************
> **************
> The information contained in this email are the opinions and views of
> the 
> author(s), and are not on behalf of Intel unless specifically stated.
>
****************************************************************************
> **************
> 
> 
> 
>  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> - - -
>      POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
>       Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
>   Replace ACTION by subscribe or unsubscribe, EMAIL by your
> Email-address
>  For daily traffic, use spug-list for LIST ;  for weekly,
> spug-list-digest
>      Seattle Perl Users Group (SPUG) Home Page:
> http://seattleperl.org
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
 For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
     Seattle Perl Users Group (SPUG) Home Page: http://seattleperl.org




More information about the spug-list mailing list