Beispiel #1
0
/*terminate the processor so cancel it*/
void ProcessorHandler( int _numSig)
{
	/*need destroy everything... item struct in both Hash */
	DataBaseDestroy( GetPtrDataBaseObi());
	DataBaseDestroy( GetPtrDataBaseSbi());
	GraphDestroy(GetPtrGraph());
	if (0 != pthread_cancel( GetProcThreadID() ) )
	{
		return;
	}
	if (0 != pthread_kill( GetProcThreadID(), SIGINT))
	{
		return;
	}
}
Beispiel #2
0
////////////////////////////////////////////////////////////
/// Destroy the application
////////////////////////////////////////////////////////////
bool ApplicationDestroy()
{
	// Destroy console
	ConsoleDestroy();

	// Destroy protocol
	ProtocolDestroy();

	// Initialize database
	if (!DataBaseDestroy())
		return false;
	
	return true;
}