How do I set the current working directory of Asterisk?
I need to be able to collect core dumps, but since Asterisk's CWD is / (so
claims procfs), it'll never be able to write them. I've confirmed my
suspicions by allowing world write to / and SIGABRT the process, lo and
behold, I had a core.
I can obviously use core_pattern to override system-wide, but I rather
like the default behavior of dumping core to the cwd. Every other Asterisk
install I've worked on, the cwd is /tmp, but for some reason this new one
it's /. I tried to `cd /tmp' in the Asterisk service start script, but
that was uneventful.
This is Asterisk C.3.7.2 on Debian 7.1, there is no chdir() in the source
that specifically sets it to /.
No comments:
Post a Comment