Merged revisions 83348 via svnmerge from
authorRussell Bryant <russell@russellbryant.com>
Thu, 20 Sep 2007 21:17:39 +0000 (21:17 +0000)
committerRussell Bryant <russell@russellbryant.com>
Thu, 20 Sep 2007 21:17:39 +0000 (21:17 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r83348 | russell | 2007-09-20 16:16:48 -0500 (Thu, 20 Sep 2007) | 4 lines

When daemonizing, don't change working directory to "/".  It makes it not be
able to do a core dump when not running as uid=root.
(closes issue #10766, xrg)

........

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

main/asterisk.c

index 0594610..4135016 100644 (file)
@@ -2823,7 +2823,7 @@ int main(int argc, char *argv[])
 
 #if HAVE_WORKING_FORK
        if (ast_opt_always_fork || !ast_opt_no_fork) {
-               daemon(0, 0);
+               daemon(1, 0);
                ast_mainpid = getpid();
                /* Blindly re-write pid file since we are forking */
                unlink(ast_config_AST_PID);