~ubuntu-branches/ubuntu/wily/mongodb/wily

« back to all changes in this revision

Viewing changes to src/mongo/util/signal_handlers.cpp

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2013-08-26 09:41:32 UTC
  • mfrom: (1.2.25)
  • Revision ID: package-import@ubuntu.com-20130826094132-8cknfm4syxyip1zt
Tags: 1:2.4.6-0ubuntu1
* New upstream point release.
* d/control,d/tests/*: Add autopkgtests for server process and client
  shell functionality.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
*    along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
17
*/
18
18
 
19
 
#include "pch.h"
 
19
#include "mongo/pch.h"
20
20
 
21
21
#include <cstdarg>
22
22
#include <cstdio>
26
26
#include <unistd.h>
27
27
#endif
28
28
 
29
 
#ifdef MONGO_HAVE_EXECINFO_BACKTRACE
30
 
#include <execinfo.h>
31
 
#endif
32
 
 
33
 
#include "log.h"
34
 
#include "signal_handlers.h"
 
29
#include "mongo/platform/backtrace.h"
 
30
#include "mongo/util/log.h"
 
31
#include "mongo/util/signal_handlers.h"
35
32
 
36
33
namespace mongo {
37
34
 
38
35
    /*
39
36
     * WARNING: PLEASE READ BEFORE CHANGING THIS MODULE
40
37
     *
41
 
     * All code in this module should be singal-friendly. Before adding any system
42
 
     * call or other dependency, please make sure the latter still holds.
 
38
     * All code in this module must be signal-friendly. Before adding any system
 
39
     * call or other dependency, please make sure that this still holds.
43
40
     *
44
41
     */
45
42
 
84
81
 
85
82
    static void formattedBacktrace( int fd ) {
86
83
 
87
 
#ifdef MONGO_HAVE_EXECINFO_BACKTRACE
 
84
#if !defined(_WIN32)
88
85
 
89
86
        int numFrames;
90
87
        const int MAX_DEPTH = 20;