Skip to content
Snippets Groups Projects
Commit 0edfb0eb authored by BJ Weschke's avatar BJ Weschke
Browse files

#ifdef'd the prctl fix to only try and compile on linux systems. Thanks...

  #ifdef'd the prctl fix to only try and compile on linux systems. Thanks rizzo for pointing this out, and credit to Armin for identifying a solution to the original problem.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9962 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent b9918fb1
No related branches found
No related tags found
No related merge requests found
......@@ -2192,11 +2192,13 @@ int main(int argc, char *argv[])
#endif /* __CYGWIN__ */
#ifdef linux
if (geteuid() && ast_opt_dump_core) {
if (prctl(PR_SET_DUMPABLE, 1, 0, 0, 0) < 0) {
ast_log(LOG_WARNING, "Unable to set the process for core dumps after changing to a non-root user. %s\n", strerror(errno));
}
}
#endif
term_init();
printf(term_end());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment