void disconnect(in connectionId id,
in Engines::DSC::Message message) raises(Engines::ConnectionManager::BadId);
+ /*!
+ Shutdown the ConnectionManager process.
+ */
+ oneway void ShutdownWithExit();
+
+ /*!
+ Returns the PID of the connection manager
+ */
+ long getPID();
};
/*--------------------------------------------------------------------------------------------*/
void Shutdown();
+/*!
+ Returns the PID of the server
+*/
+ long getPID();
+
+/*!
+ Shutdown the StudyManager process.
+*/
+ oneway void ShutdownWithExit();
+
/*! \brief Creation of a new study
Creates a new study with a definite name.
in ResPolicy policy,
in CompoList componentList );
+ oneway void ShutdownWithExit();
+
void ShutdownContainers();
+
+ long getPID();
+
} ;
/*! \brief Interface of the %resourcesManager
{
void ping();
+/*!
+ Returns the PID of the server
+*/
+ long getPID();
+
+/*!
+ Shutdown the ModuleCatalog process.
+*/
+ oneway void ShutdownWithExit();
+
/*!
Gets a list of names of computers of the catalog
*/
interface Components
{
void ping();
+ long getPID();
unsigned long add ( in Infos lesInfos ) ;
void remove ( in unsigned long id ) ;
unsigned long size() ;
Determines whether the server has already been loaded or not.
*/
void ping();
+/*!
+ Returns the PID of the server
+*/
+ long getPID();
/*!
Get Active study ID
*/
_remove_ref();
}
+//=============================================================================
+/*! CORBA method:
+ * shutdown the ContainerManager servant and kill the ContainerManager process
+ */
+//=============================================================================
+void SALOME_ContainerManager::ShutdownWithExit()
+{
+ MESSAGE("ShutdownWithExit");
+ PortableServer::ObjectId_var oid = _default_POA()->servant_to_id(this);
+ _default_POA()->deactivate_object(oid);
+ _remove_ref();
+
+ exit( EXIT_SUCCESS );
+}
+
//=============================================================================
/*! CORBA Method:
* Loop on all the containers listed in naming service, ask shutdown on each
}
}
+//=============================================================================
+/*! CORBA Method:
+ * Returns the PID of the container manager
+ */
+//=============================================================================
+CORBA::Long SALOME_ContainerManager::getPID()
+{
+ return (CORBA::Long)getpid();
+}
+
//=============================================================================
/*! CORBA Method:
* Find a suitable Container in a list of machines, or start one
const Engines::CompoList& componentList);
void Shutdown();
+ void ShutdownWithExit();
void ShutdownContainers();
+ CORBA::Long getPID();
+
static const char *_ContainerManagerNameInNS;
// Parallel extension
delete infos;
ids.erase(id);
}
+
+void
+ConnectionManager_i::ShutdownWithExit()
+{
+ exit( EXIT_SUCCESS );
+}
+
+CORBA::Long
+ConnectionManager_i::getPID()
+{
+ return (CORBA::Long)getpid();
+}
Engines::DSC::Message message)
throw (Engines::ConnectionManager::BadId);
+ /*!
+ Shutdown the ConnectionManager process.
+ */
+ void ShutdownWithExit();
+
+ /*!
+ Returns the PID of the connection manager
+ */
+ CORBA::Long getPID();
+
private :
struct connection_infos {
return NULL;
}
+CORBA::Long SALOME_ModuleCatalogImpl::getPID()
+{
+ return (CORBA::Long)getpid();
+}
+
+void SALOME_ModuleCatalogImpl::ShutdownWithExit()
+{
+ exit( EXIT_SUCCESS );
+}
+
ParserComponent *
SALOME_ModuleCatalogImpl::findComponent(const string & name)
{
GetComponentInfo(const char *name);
void ping(){};
+ CORBA::Long getPID();
+ void ShutdownWithExit();
void shutdown() { if(!CORBA::is_nil(_orb)) _orb->shutdown(0); };
MESSAGE(" RegistryService::ping() pid "<< _getpid());
#endif
}
+
+CORBA::Long RegistryService::getPID()
+{
+ return (CORBA::Long)getpid();
+}
virtual ~RegistryService(void);
void ping();
+ CORBA::Long getPID();
virtual CORBA::ULong add (const Registry::Infos & infos);
virtual CORBA::ULong size ( void );
#ifndef WNT
return PortableServer::POA::_nil();
}
+CORBA::Long SALOMEDS_StudyManager_i::getPID()
+{
+#ifdef WIN32
+ return (CORBA::Long)_getpid();
+#else
+ return (CORBA::Long)getpid();
+#endif
+}
+
+void SALOMEDS_StudyManager_i::ShutdownWithExit()
+{
+ exit( EXIT_SUCCESS );
+}
+
//===========================================================================
// PRIVATE FUNCTIONS
//===========================================================================
// std C++ headers
#include <iostream>
+#ifndef WNT
+#include <unistd.h>
+#endif
+
// IDL headers
#include <SALOMEconfig.h>
#include CORBA_SERVER_HEADER(SALOMEDS)
virtual CORBA::Object_ptr ConvertIORToObject(const char* theIOR) { return _orb->string_to_object(theIOR); };
void ping(){};
+ CORBA::Long getPID();
+ void ShutdownWithExit();
virtual CORBA::LongLong GetLocalImpl(const char* theHostname, CORBA::Long thePID, CORBA::Boolean& isLocal);
if ( ! CORBA::is_nil( _orb ) )
{
//std::cerr << "appel _orb->destroy()" << std::endl;
- _orb->destroy() ;
+ try {
+ _orb->destroy() ;
+ }
+ catch(...) {
+ MESSAGE("Caught CORBA::Exception.");
+ }
//std::cerr << "retour _orb->destroy()" << std::endl;
}
}