Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Re: Re: Killing child process

by pg (Canon)
on Oct 12, 2003 at 17:02 UTC ( [id://298668]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Killing child process
in thread Killing child process

Two points about OS:
  • To send a signal to a process group, you have to be a super user;
  • Most of OS's, if not all, does not let you capture SIGTERM for ordinary users. That's for a good reason, if some processes (intentionally or by mistake - bugs) decide to be alive forever, that will really be a nightmare.

Replies are listed 'Best First'.
Re: Re: Re: Re: Killing child process
by sgifford (Prior) on Oct 12, 2003 at 17:42 UTC
    • This program doesn't work when run as root either.
    • I believe you're thinking of SIGKILL. SIGTERM is a perfectly normal signal. If I change the kill command to just send a normal signal to $kidpid, then the child process prints the TERM message, but not the grandchildren. Similarly, if you make the sleeps a little longer, you can send TERM signals by hand to individual grandchildren, and they print the message.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://298668]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-03-19 03:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found