mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-18 18:58:22 +00:00
#ifdef'd the prctl fix to only try and compile on linux systems. Thanks rizzo for pointing this out.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@9961 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2210,12 +2210,16 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
#endif /* __CYGWIN__ */
|
#endif /* __CYGWIN__ */
|
||||||
|
|
||||||
|
#ifdef linux
|
||||||
|
|
||||||
if (geteuid() && option_dumpcore) {
|
if (geteuid() && option_dumpcore) {
|
||||||
if (prctl(PR_SET_DUMPABLE, 1, 0, 0, 0) < 0) {
|
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));
|
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();
|
term_init();
|
||||||
printf(term_end());
|
printf(term_end());
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
|
Reference in New Issue
Block a user