File: main.cpp

package info (click to toggle)
ace 6.0.3%2Bdfsg-0.1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 49,368 kB
  • sloc: cpp: 341,826; perl: 30,850; ansic: 20,952; makefile: 10,144; sh: 4,744; python: 828; exp: 787; yacc: 511; xml: 330; lex: 158; lisp: 116; csh: 48; tcl: 5
file content (33 lines) | stat: -rw-r--r-- 779 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// $Id: main.cpp 80826 2008-03-04 14:51:23Z wotte $
#include "ace/Log_Msg.h"
#include "ace/Reactor.h"
#include "ace/Select_Reactor.h"
#include "ace/Service_Config.h"
#include "ace/Thread_Manager.h"

#include "jaws3/Event_Dispatcher.h"
#include "jaws3/Signal_Task.h"

int
ACE_TMAIN(int argc, ACE_TCHAR *argv[])
{
  ACE_REACTOR_INSTANCE_INIT;

  JAWS_Signal_Task::instance ();

  if (ACE_Service_Config::open (argc, argv) == -1
      && errno != ENOENT)
    ACE_ERROR_RETURN ((LM_ERROR,
                       ACE_TEXT ("%p\n"),
                       ACE_TEXT ("open")),
                      1);

  // Run forever, performing the configured services until we
  // shutdown.

  JAWS_Event_Dispatcher::run_event_loop ();

  ACE_Thread_Manager::instance ()->wait ();

  return 0;
}