~drizzle-developers/drizzle/elliott-release

« back to all changes in this revision

Viewing changes to plugin/signal_handler/signal_handler.cc

  • Committer: Patrick Crews
  • Date: 2011-02-01 20:33:06 UTC
  • mfrom: (1845.2.288 drizzle)
  • Revision ID: gleebix@gmail.com-20110201203306-mwq2rk0it81tlwxh
Merged Trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
 
28
28
#include "drizzled/session/cache.h"
29
29
 
 
30
#include "drizzled/debug.h"
 
31
 
30
32
#include "drizzled/drizzled.h"
31
33
 
32
34
#include <boost/thread/thread.hpp>
47
49
extern boost::filesystem::path pid_file;
48
50
/* Prototypes -> all of these should be factored out into a propper shutdown */
49
51
extern void close_connections(void);
50
 
extern std::bitset<12> test_flags;
51
52
}
52
53
 
53
54
using namespace drizzled;
120
121
  boost::this_thread::at_thread_exit(&internal::my_thread_end);
121
122
  signal_thread_in_use= true;
122
123
 
123
 
  if ((test_flags.test(TEST_SIGINT)))
 
124
  if ((drizzled::getDebug().test(drizzled::debug::ALLOW_SIGINT)))
124
125
  {
125
126
    (void) sigemptyset(&set);                   // Setup up SIGINT for debug
126
127
    (void) sigaddset(&set,SIGINT);              // For debugging
127
 
    (void) pthread_sigmask(SIG_UNBLOCK,&set,NULL);
 
128
    (void) pthread_sigmask(SIG_UNBLOCK, &set, NULL);
128
129
  }
129
130
  (void) sigemptyset(&set);                     // Setup up SIGINT for debug
130
131
#ifndef IGNORE_SIGHUP_SIGQUIT
279
280
}
280
281
 
281
282
 
282
 
static drizzle_sys_var* system_variables[]= {
283
 
  NULL
284
 
};
285
 
 
286
283
DRIZZLE_DECLARE_PLUGIN
287
284
{
288
285
  DRIZZLE_VERSION_ID,
292
289
  "Default Signal Handler",
293
290
  PLUGIN_LICENSE_GPL,
294
291
  init, /* Plugin Init */
295
 
  system_variables,   /* system variables */
 
292
  NULL,   /* depends */
296
293
  NULL    /* config options */
297
294
}
298
295
DRIZZLE_DECLARE_PLUGIN_END;