in reply to exec sometimes changes pid
But, of course, this assumes you don't have other stuff running in the process group that you need to leave alive, besides the parent.my $pgrp_id=getpgrp(0) # gets the process group id of # the current process { # scoping is important! Otherwise # that signal will always be ignored # by the parent, which is probably bad. # I picked SIGINT, you might prefer something # else. local $SIG{'INT'}='IGNORE'; kill 2, -$pgrp_id; # - means it's a group id. }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: exec sometimes changes pid
by doom (Deacon) on Aug 03, 2009 at 01:12 UTC | |
|
Re^2: exec sometimes changes pid
by cdarke (Prior) on Aug 03, 2009 at 03:44 UTC | |
by doom (Deacon) on Aug 04, 2009 at 12:43 UTC |