servlib/bundling/BundleDaemon.cc
changeset 14 06512deddac4
parent 13 841ab1482c9c
child 15 65e62bd13efd
equal deleted inserted replaced
13:841ab1482c9c 14:06512deddac4
  2865 
  2865 
  2866     // get void*'s for all entries on the stack
  2866     // get void*'s for all entries on the stack
  2867     size = backtrace(array, 10);
  2867     size = backtrace(array, 10);
  2868 
  2868 
  2869     // print out all the frames to stderr
  2869     // print out all the frames to stderr
       
  2870     //log_err(stderr, "Error: signal %d:\n", sig);
  2870     fprintf(stderr, "Error: signal %d:\n", sig);
  2871     fprintf(stderr, "Error: signal %d:\n", sig);
       
  2872 
  2871     backtrace_symbols_fd(array, size, 2);
  2873     backtrace_symbols_fd(array, size, 2);
  2872     exit(1);
  2874     exit(1);
  2873 }
  2875 }
  2874 
  2876 
  2875 //----------------------------------------------------------------------
  2877 //----------------------------------------------------------------------
  2876 void
  2878 void
  2877 BundleDaemon::run()
  2879 BundleDaemon::run()
  2878 {
  2880 {
  2879     static const char* LOOP_LOG = "/dtn/bundle/daemon/loop";
  2881     static const char* LOOP_LOG = "/dtn/bundle/daemon/loop";
       
  2882 
       
  2883     signal(SIGSEGV, handle_sigsegv);
  2880     
  2884     
  2881     if (! BundleTimestamp::check_local_clock()) {
  2885     if (! BundleTimestamp::check_local_clock()) {
  2882         exit(1);
  2886         exit(1);
  2883     }
  2887     }
  2884     
  2888