how's get child's pid and kill it? 
Author Message
 how's get child's pid and kill it?

hi,
can someone tell me how to get child's pid and kill it
in perl?
i.e
   system ' ... '; ( or exec '...'; )
 what i need is, get this child-process' id and kill
 it later.

thank you in advance for your help.



Sat, 15 Mar 1997 00:04:12 GMT  
 how's get child's pid and kill it?

Quote:

>hi,
>can someone tell me how to get child's pid and kill it
>in perl?
>i.e
>   system ' ... '; ( or exec '...'; )
> what i need is, get this child-process' id and kill
> it later.

You'd normally use "fork" if you want the child's pid.  The child
can then "exec" whatever it's supposed to do.  The parent can save
the pid returned from fork and kill the child later.

Aint unix a cruel world? :-)

Anno



Sat, 15 Mar 1997 03:21:26 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. PID's, killing processes when new one starts - revisited

2. Killing PID's

3. maintaining a list of child process pid's (exec winterm)

4. open doesn't return child pid under OS/2

5. Knowing the pid of a fork()'ed child, really

6. pid's of 2nd generation child processes

7. killing a child PID

8. kill proc's child

9. Monitoring multiple child process's children ?

10. killing a child and its children

11. Newbie Question: 'kill'ing a script

12. Killing a script after 'n' minutes

 

 
Powered by phpBB® Forum Software