Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / ACE / apps / JAWS2 / main.cpp
blob2032bdf427cfd7b3aad38792776da1c4997fca82
1 #include "JAWS/Server.h"
2 #include "HTTP_10.h"
6 #ifdef ACE_HAS_SIG_C_FUNC
7 extern "C"
9 #endif /* ACE_HAS_SIG_C_FUNC */
11 static void
12 handler (int)
14 ACE_OS::exit (0);
15 // call exit() so that static destructors get called
18 #ifdef ACE_HAS_SIG_C_FUNC
20 #endif /* ACE_HAS_SIG_C_FUNC */
22 static JAWS_HTTP_10_Read_Task HTTP_Read;
23 static JAWS_HTTP_10_Parse_Task HTTP_Parse;
24 static JAWS_HTTP_10_Write_Task HTTP_Write;
26 int
27 ACE_TMAIN (int argc, ACE_TCHAR *argv[])
29 ACE_OS::signal (SIGCHLD, SIG_IGN);
31 // SigAction not needed since the handler will shutdown the server.
32 ACE_OS::signal (SIGINT, (ACE_SignalHandler) handler);
33 ACE_OS::signal (SIGUSR2, (ACE_SignalHandler) handler);
35 JAWS_Server server (argc, argv);
37 HTTP_Read.next (&HTTP_Parse);
38 HTTP_Parse.next (&HTTP_Write);
39 // HTTP_Write.next (JAWS_Pipeline_Done_Task_Singleton::instance ());
41 if (server.open (&HTTP_Read) == -1)
42 ACE_DEBUG ((LM_DEBUG, "JAWS: Error opening server\n"));
44 return 0;