/[pxelator]/lib/PXElator/daemons.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /lib/PXElator/daemons.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 226 by dpavlin, Sun Aug 16 00:03:30 2009 UTC revision 227 by dpavlin, Sun Aug 16 21:27:15 2009 UTC
# Line 58  sub start_stop { Line 58  sub start_stop {
58                  my $pstree = `pstree -p $pid`;                  my $pstree = `pstree -p $pid`;
59                  my @pids = $pstree =~ m{\((\d+)\)}g;                  my @pids = $pstree =~ m{\((\d+)\)}g;
60                  warn "pstree $pstree pids ",dump( @pids );                  warn "pstree $pstree pids ",dump( @pids );
61                  kill 1, $_ foreach reverse @pids;                  foreach ( @pids ) {
62                            warn "kill $_\n";
63                            kill 1, $_;
64                            if ( kill 0, $_ ) {
65                                    warn "kill 9 $_";
66                                    kill 9, $_;
67                            }
68                    }
69                  $pids->{$daemon} = 'stopped';                  $pids->{$daemon} = 'stopped';
70                  audit 'stopped', $daemon, pid => $pid;                  audit 'stopped', $daemon, pid => $pid;
71                  return qq|$daemon pid $pid stopped|;                  return qq|$daemon pid $pid stopped|;

Legend:
Removed from v.226  
changed lines
  Added in v.227

  ViewVC Help
Powered by ViewVC 1.1.26