Index: utils/astcanary.c =================================================================== --- utils/astcanary.c (revision 239307) +++ utils/astcanary.c (working copy) @@ -87,9 +87,10 @@ int main(int argc, char *argv[]) { int fd; + pid_t parent = getppid(); /* Run at normal priority */ setpriority(PRIO_PROCESS, 0, 0); - for (;;) { + for (; parent == getppid() ;) { /* Update the modification times (checked from Asterisk) */ if (utime(argv[1], NULL)) { /* Recreate the file if it doesn't exist */ @@ -108,7 +109,7 @@ sleep(5); } - /* Never reached */ + /* End when the parent dies */ return 0; }