#include "porting.h"
#include "config.h"
+#include "debug.h"
namespace porting
{
{
if(g_killed == false)
{
- dstream<<DTIME<<"sigint_handler(): "
+ dstream<<DTIME<<"INFO: sigint_handler(): "
<<"Ctrl-C pressed, shutting down."<<std::endl;
+
+ dstream<<DTIME<<"INFO: sigint_handler(): "
+ <<"Printing debug stacks"<<std::endl;
+ debug_stacks_print();
+
g_killed = true;
}
else
char buf[BUFSIZ];
memset(buf, 0, BUFSIZ);
// Get path to executable
- readlink("/proc/self/exe", buf, BUFSIZ-1);
+ assert(readlink("/proc/self/exe", buf, BUFSIZ-1) != -1);
pathRemoveFile(buf, '/');
char buf[BUFSIZ];
memset(buf, 0, BUFSIZ);
// Get path to executable
- readlink("/proc/self/exe", buf, BUFSIZ-1);
+ assert(readlink("/proc/self/exe", buf, BUFSIZ-1) != -1);
pathRemoveFile(buf, '/');