diff -urN asterisk-1.6.2.1-rc1_orig/utils/astcanary.c asterisk-1.6.2.1-rc1/utils/astcanary.c --- asterisk-1.6.2.1-rc1_orig/utils/astcanary.c 2010-01-14 12:17:47.000000000 +0100 +++ asterisk-1.6.2.1-rc1/utils/astcanary.c 2010-01-14 12:18:41.000000000 +0100 @@ -89,7 +89,7 @@ int fd; /* Run at normal priority */ setpriority(PRIO_PROCESS, 0, 0); - for (;;) { + for (;getppid() != 1;) { /* Update the modification times (checked from Asterisk) */ if (utime(argv[1], NULL)) { /* Recreate the file if it doesn't exist */ @@ -108,7 +108,7 @@ sleep(5); } - /* Never reached */ + /* Reached if asterisk (our parent) process dies - it's chldren (we) are inherited by the init process (pid is 1). */ return 0; }