~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/signal_handler/signal_handler.cc

  • Committer: Stewart Smith
  • Date: 2010-11-10 08:10:53 UTC
  • mto: (1819.7.44 update-innobase)
  • mto: This revision was merged to the branch mainline in revision 1926.
  • Revision ID: stewart@flamingspork.com-20101110081053-fz4depckopv167tg
add tset for bug673380: CREATE TABLE AS can create a table with a column type of NULL

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
#include "drizzled/plugin/daemon.h"
26
26
#include "drizzled/signal_handler.h"
27
27
 
28
 
#include "drizzled/session_list.h"
29
 
 
30
28
#include "drizzled/drizzled.h"
31
29
 
32
30
#include <boost/thread/thread.hpp>
54
52
 
55
53
 
56
54
 
57
 
 
58
55
/**
59
56
  Force server down. Kill all connections and threads and exit.
60
57
 
161
158
    (Asked MontyW over the phone about this.) -Brian
162
159
 
163
160
  */
164
 
  session::Cache::singleton().mutex().lock();
165
 
  session::Cache::singleton().mutex().unlock();
 
161
  LOCK_thread_count.lock();
 
162
  LOCK_thread_count.unlock();
166
163
  COND_thread_count.notify_all();
167
164
 
168
165
  if (pthread_sigmask(SIG_BLOCK, &set, NULL))
227
224
    drizzled::plugin::Daemon("Signal Handler")
228
225
  {
229
226
    // @todo fix spurious wakeup issue
230
 
    boost::mutex::scoped_lock scopedLock(session::Cache::singleton().mutex());
 
227
    boost::mutex::scoped_lock scopedLock(LOCK_thread_count);
231
228
    thread= boost::thread(signal_hand);
232
229
    signal_thread= thread.native_handle();
233
230
    COND_thread_count.wait(scopedLock);