]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 255952 via svnmerge from
authorTilghman Lesher <tilghman@meg.abyt.es>
Fri, 2 Apr 2010 20:20:40 +0000 (20:20 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Fri, 2 Apr 2010 20:20:40 +0000 (20:20 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

........
  r255952 | tilghman | 2010-04-02 15:19:01 -0500 (Fri, 02 Apr 2010) | 8 lines

  Pass the PID of the Asterisk process, not the PID of the canary.

  (closes issue #17065)
   Reported by: globalnetinc
   Patches:
         astcanary.patch uploaded by makoto (license 38)
   Tested by: frawd, globalnetinc
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@255954 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/asterisk.c

index 1f5987b72f79c6457c454d7b6c64268b6cf88b4f..fcf9a5a75d1b975a7a78f16560fbf40024dda082 100644 (file)
@@ -3351,7 +3351,7 @@ int main(int argc, char *argv[])
 
                        ast_close_fds_above_n(0);
                        ast_set_priority(0);
-                       snprintf(ppid, sizeof(ppid), "%d", (int) getpid());
+                       snprintf(ppid, sizeof(ppid), "%d", (int) ast_mainpid);
 
                        execlp("astcanary", "astcanary", canary_filename, ppid, (char *)NULL);