~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/signal_handler/signal_handler.cc

  • Committer: Brian Aker
  • Date: 2011-10-19 19:30:54 UTC
  • mto: This revision was merged to the branch mainline in revision 2444.
  • Revision ID: brian@tangent.org-20111019193054-pxnb4hflrmbfhmbm
Fix level_t to be more inline with syslog

Show diffs side-by-side

added added

removed removed

Lines of Context:
69
69
{
70
70
  // if there is a signal during the kill in progress, ignore the other
71
71
  if (kill_in_progress)                         // Safety
 
72
  {
72
73
    return;
73
 
  kill_in_progress=true;
74
 
  abort_loop=1;                                 // This should be set
 
74
  }
 
75
 
 
76
  kill_in_progress= true;
 
77
  abort_loop= true;                                     // This should be set
75
78
  if (sig != 0) // 0 is not a valid signal number
 
79
  {
76
80
    ignore_signal(sig);                    /* purify inspected */
 
81
  }
 
82
 
77
83
  if (sig == SIGTERM || sig == 0)
 
84
  {
78
85
    errmsg_printf(error::INFO, _(ER(ER_NORMAL_SHUTDOWN)),internal::my_progname);
 
86
  }
79
87
  else
 
88
  {
80
89
    errmsg_printf(error::ERROR, _(ER(ER_GOT_SIGNAL)),internal::my_progname,sig);
 
90
  }
81
91
 
82
92
  close_connections();
83
93
  clean_up(1);
107
117
  memset(buff, 0, sizeof(buff));
108
118
  snprintf(buff, sizeof(buff)-1, "Can't start server: can't create PID file (%s)", pid_file.file_string().c_str());
109
119
  sql_perror(buff);
110
 
  exit(1);
 
120
  exit(EXIT_FAILURE);
111
121
}
112
122
 
113
123