aboutsummaryrefslogtreecommitdiffstats
path: root/asterisk.c
diff options
context:
space:
mode:
authorbweschke <bweschke@f38db490-d61c-443f-a65b-d21fe96a405b>2006-02-14 18:45:34 +0000
committerbweschke <bweschke@f38db490-d61c-443f-a65b-d21fe96a405b>2006-02-14 18:45:34 +0000
commit0d1d95a9a321d0b8638bf2560345207fa21b1163 (patch)
tree3d50b062e277ba15a1c7cf9f14b5ce7331094697 /asterisk.c
parent24003322e258bb03f9ef654cba23fc0a674fb8ab (diff)
#ifdef'd the prctl fix to only try and compile on linux systems. Thanks rizzo for pointing this out.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@9961 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'asterisk.c')
-rw-r--r--asterisk.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/asterisk.c b/asterisk.c
index 0ec8f9979..bd20a4840 100644
--- a/asterisk.c
+++ b/asterisk.c
@@ -2210,12 +2210,16 @@ int main(int argc, char *argv[])
#endif /* __CYGWIN__ */
+#ifdef linux
+
if (geteuid() && option_dumpcore) {
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());
fflush(stdout);