More tests update
[ACE_TAO.git] / TAO / tests / Bug_3315_Regression / main.cpp
blob472ac65e3bf286af044a0eb76701840ca260d6cc
1 #include "tao/ORB.h"
2 #include "ace/Log_Msg.h"
3 #include "ace/Thread.h"
4 #include "ace/os_include/os_pthread.h"
6 int result = 0;
8 #if defined (__SUNPRO_CC)
9 extern "C"
10 #endif /* __SUNPRO_CC */
11 ACE_THR_FUNC_RETURN main_orb(void*)
13 try
15 int argc = 0;
16 ACE_TCHAR **argv = 0;
17 CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
19 orb->destroy ();
21 catch(...)
23 result = 1;
24 ACE_ERROR ((LM_ERROR, ACE_TEXT("(%P|%t) Unknown error\n")));
27 return 0;
30 int ACE_TMAIN(int, ACE_TCHAR*[])
32 ACE_hthread_t thread1;
33 # if defined (ACE_HAS_PTHREADS)
34 pthread_create(&thread1, 0, main_orb, 0);
35 #else
36 ACE_Thread::spawn (main_orb, 0, THR_NEW_LWP|THR_JOINABLE, 0, &thread1);
37 #endif
38 ACE_Thread::join( thread1);
40 return result;