Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / ACE / apps / JAWS2 / main.cpp
blob2c6b857b65717c79b56f224d6792ce8ea16bb3e8
1 #include "JAWS/Server.h"
2 #include "HTTP_10.h"
5 #ifdef ACE_HAS_SIG_C_FUNC
6 extern "C"
8 #endif /* ACE_HAS_SIG_C_FUNC */
10 static void
11 handler (int)
13 ACE_OS::exit (0);
14 // call exit() so that static destructors get called
17 #ifdef ACE_HAS_SIG_C_FUNC
19 #endif /* ACE_HAS_SIG_C_FUNC */
21 static JAWS_HTTP_10_Read_Task HTTP_Read;
22 static JAWS_HTTP_10_Parse_Task HTTP_Parse;
23 static JAWS_HTTP_10_Write_Task HTTP_Write;
25 int
26 ACE_TMAIN (int argc, ACE_TCHAR *argv[])
28 ACE_OS::signal (SIGCHLD, SIG_IGN);
30 // SigAction not needed since the handler will shutdown the server.
31 ACE_OS::signal (SIGINT, (ACE_SignalHandler) handler);
32 ACE_OS::signal (SIGUSR2, (ACE_SignalHandler) handler);
34 JAWS_Server server (argc, argv);
36 HTTP_Read.next (&HTTP_Parse);
37 HTTP_Parse.next (&HTTP_Write);
38 // HTTP_Write.next (JAWS_Pipeline_Done_Task_Singleton::instance ());
40 if (server.open (&HTTP_Read) == -1)
41 ACE_DEBUG ((LM_DEBUG, "JAWS: Error opening server\n"));
43 return 0;