summaryrefslogtreecommitdiff
path: root/examples/Service_Configurator/IPC-tests/server/server_test.cpp
blob: f65523d956d0eb0f835da63381d61ee4190b9e6e (plain)
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
/* The main test driver for the dynamically configured server. */
// $Id$


#include "ace/Service_Config.h"

sig_atomic_t finished = 0;

static void
handler (int)
{
  finished = 1;
}

int
main (int argc, char *argv[])
{
  ACE_Service_Config server_test;

  ACE_Sig_Action sig ((ACE_SignalHandler) handler, SIGINT);

  if (server_test.open (argc, argv) == -1)
    ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "server_test.open"), -1);

  for (;;)
    if (server_test.run_reactor_event_loop () == -1 && finished)
      break;

  /* NOTREACHED */
  return 0;
}