/[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 231 by dpavlin, Sun Aug 16 22:24:22 2009 UTC revision 245 by dpavlin, Mon Aug 17 15:14:58 2009 UTC
# Line 54  sub start_stop { Line 54  sub start_stop {
54          $pid ||= 'not started';          $pid ||= 'not started';
55          warn "start_stop $daemon $pid\n";          warn "start_stop $daemon $pid\n";
56    
57          if ( $pid =~ m{^\d+$} ) {          if ( $pid =~ m{^\d+$} && kill 0, $pid ) {
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 );

Legend:
Removed from v.231  
changed lines
  Added in v.245

  ViewVC Help
Powered by ViewVC 1.1.26