aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-02-24 20:07:36 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-02-24 20:07:36 +0000
commit888f601479c424bb4b0378d14f19b33c826f9cfa (patch)
treea21b1b05238c845d0d248969d0fc2423b342ee6f /utils
parent05eff19e0f159334c01570f0ab2b4eface7d5be0 (diff)
Merged revisions 178342 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r178342 | tilghman | 2009-02-24 14:06:48 -0600 (Tue, 24 Feb 2009) | 2 lines 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/branches/1.6.0@178343 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'utils')
-rw-r--r--utils/astcanary.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/astcanary.c b/utils/astcanary.c
index bb3492af7..68557beaa 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;
}