~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/drizzled.cc

  • Committer: Stewart Smith
  • Date: 2011-02-08 06:36:03 UTC
  • mto: (2155.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 2156.
  • Revision ID: stewart@flamingspork.com-20110208063603-zd9e178urmezetcb
partition the initialisation of variables and command line options into two phases: the first being the simple one (that we can get out the --daemon option for) and the second being loading plugins, pidfile setup etc. This makes --daemon do the pidfile correctly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1085
1085
  }
1086
1086
}
1087
1087
 
1088
 
int init_common_variables(int argc, char **argv, module::Registry &plugins)
 
1088
int init_basic_variables(int argc, char **argv)
1089
1089
{
1090
1090
  time_t curr_time;
1091
1091
  umask(((~internal::my_umask) & 0666));
1412
1412
    unireg_abort(1);
1413
1413
  }
1414
1414
 
 
1415
  return 0;
 
1416
}
 
1417
 
 
1418
int init_remaining_variables(module::Registry &plugins)
 
1419
{
 
1420
  int style = po::command_line_style::default_style & ~po::command_line_style::allow_guessing;
 
1421
 
 
1422
  current_pid= getpid();                /* Save for later ref */
 
1423
 
1415
1424
  /* At this point, we've read all the options we need to read from files and
1416
1425
     collected most of them into unknown options - now let's load everything
1417
1426
  */
1491
1500
 
1492
1501
  fix_paths();
1493
1502
 
1494
 
  current_pid= getpid();                /* Save for later ref */
1495
1503
  init_time();                          /* Init time-functions (read zone) */
1496
1504
 
1497
1505
  if (item_create_init())