Changeset e9dea15c596d028be11696594b9a5653665a4d2d

Show
Ignore:
Timestamp:
03/14/11 22:37:49 (3 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1300142269 +0000
git-parent:

[870413eae711c48e44ae4e05a6183c3df3a63158]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1300142269 +0000
Message:

run the glider when we watchdog too

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/utils/noit_watchdog.c

    rd11edc6 re9dea15  
    103103int noit_monitored_child_pid = -1; 
    104104 
     105void run_glider(int pid) { 
     106  char cmd[1024], unused; 
     107  if(glider_path) { 
     108    snprintf(cmd, sizeof(cmd), "%s %d > %s/%s.%d.trc", 
     109             glider_path, pid, trace_dir, appname, pid); 
     110    unused = system(cmd); 
     111  } 
     112} 
     113 
    105114void glideme(int sig) { 
    106   char cmd[1024], unused; 
    107115  signal(sig, SIG_DFL); 
    108   snprintf(cmd, sizeof(cmd), "%s %d > %s/%s.%d.trc", 
    109            glider_path, noit_monitored_child_pid, 
    110            trace_dir, appname, noit_monitored_child_pid); 
    111   unused = system(cmd); 
     116  run_glider(noit_monitored_child_pid); 
    112117  kill(noit_monitored_child_pid, sig); 
    113118} 
     
    167172                "Watchdog timeout (%lu s)... terminating child\n", 
    168173                ltt); 
     174          run_glider(child_pid); 
    169175          kill(child_pid, SIGKILL); 
    170176        }