A recent change was made to avoid a race condition on shutdown which only called
the end functions from the console thread. However, when pressing Ctrl-C the
quit handler is called from the signal handler thread.
(closes issue #17698)
Reported by: jmls
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@290862 65c4cc65-6c06-0410-ace0-fbb531ad65f3