diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-02-24 20:06:48 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-02-24 20:06:48 +0000 |
commit | 90004ef7947cfb4e6915e51c573f4c25f2cfaa75 (patch) | |
tree | f03a71f5e06e61dd232708927f3315ce3084f604 /utils | |
parent | 0dbdfbbfe3c7457d18177fdc007fdef9982afbad (diff) |
Use a SIGPIPE to kill the process, instead of depending upon the astcanary process being inherited by init.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@178342 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'utils')
-rw-r--r-- | utils/astcanary.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/astcanary.c b/utils/astcanary.c index eea228916..aa13c5656 100644 --- a/utils/astcanary.c +++ b/utils/astcanary.c @@ -89,7 +89,7 @@ int main(int argc, char *argv[]) int fd; /* Run at normal priority */ setpriority(PRIO_PROCESS, 0, 0); - for (; getppid() != 1;) { + for (;;) { /* Update the modification times (checked from Asterisk) */ if (utime(argv[1], NULL)) { /* Recreate the file if it doesn't exist */ @@ -108,7 +108,7 @@ int main(int argc, char *argv[]) sleep(5); } - /* Reached if asterisk (our parent process) dies - its chldren are inherited by the init process (pid is 1). */ + /* Never reached */ return 0; } |