Example #1
0
int main(int argc, char** argv)
{
  mallopt(M_MMAP_MAX, DEFAULT_MMAP_MAX_VAL);
  ob_init_memory_pool();
  tbsys::WarningBuffer::set_warn_log_on(true);
  //easy_pool_set_allocator(ob_malloc);
  ObUpdateServerMain* ups = ObUpdateServerMain::get_instance();
  int ret = OB_SUCCESS;
  if (NULL == ups)
  {
    fprintf(stderr, "cannot start updateserver, new ObUpdateServerMain failed\n");
    ret = OB_ERROR;
  }
  else
  {
    ret = ups->start(argc, argv);
    if (OB_SUCCESS == ret)
    {
      ups->destroy();
    }
    BaseMain::restart_server(argc, argv);
  }

  return ret;
}
Example #2
0
int main(int argc, char** argv)
{
  mallopt(M_MMAP_MAX, DEFAULT_MMAP_MAX_VAL);
  ob_init_memory_pool();
  ObUpdateServerMain* ups = ObUpdateServerMain::get_instance();
  int ret = OB_SUCCESS;
  if (NULL == ups) 
  {
    fprintf(stderr, "cannot start updateserver, new ObUpdateServerMain failed\n");
    ret = OB_ERROR;
  }
  else 
  {
    ret = ups->start(argc, argv, PUBLIC_SECTION_NAME);
    if (OB_SUCCESS == ret)
    {
      ups->destroy();
    }
  }

  return ret;
}