~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/signal_handler.cc

  • Committer: Brian Aker
  • Date: 2010-11-06 15:43:10 UTC
  • mfrom: (1908.1.1 merge)
  • Revision ID: brian@tangent.org-20101106154310-g1jpjzwbc53pfc4f
Filesort encapsulation, plus modification to copy contructor

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
#include "drizzled/signal_handler.h"
25
25
#include "drizzled/drizzled.h"
26
26
#include "drizzled/session.h"
27
 
#include "drizzled/session/cache.h"
28
27
#include "drizzled/internal/my_sys.h"
29
28
#include "drizzled/probes.h"
30
29
#include "drizzled/plugin.h"
49
48
void drizzled_print_signal_warning(int sig)
50
49
{
51
50
  if (global_system_variables.log_warnings)
52
 
    errmsg_printf(ERRMSG_LVL_WARN, _("Got signal %d from thread %"PRIu32),
 
51
    errmsg_printf(ERRMSG_LVL_WARN, _("Got signal %d from thread %"PRIu64),
53
52
                  sig, global_thread_id);
54
53
#ifndef HAVE_BSD_SIGNALS
55
54
  sigset_t set;
68
67
/** Called when a thread is aborted. */
69
68
void drizzled_end_thread_signal(int )
70
69
{
71
 
  Session *session= current_session;
 
70
  Session *session=current_session;
72
71
  if (session)
73
72
  {
74
 
    Session::shared_ptr session_ptr(session::Cache::singleton().find(session->getSessionId()));
75
 
    if (not session_ptr) // We need to make we have a lock on session before we do anything with it.
76
 
      return;
77
 
 
78
73
    killed_threads++;
79
 
 
80
 
    // We need to get the ID before we kill off the session
81
 
    session_ptr->scheduler->killSessionNow(session_ptr);
82
 
    DRIZZLE_CONNECTION_DONE(session_ptr->getSessionId());
 
74
    session->scheduler->killSessionNow(session);
 
75
    DRIZZLE_CONNECTION_DONE(session->thread_id);
83
76
  }
 
77
  return;
84
78
}
85
79
 
86
80
static void write_core(int sig)