コード例 #1
0
ファイル: Hooks.cpp プロジェクト: ato/passenger
	void initChild(apr_pool_t *pchild, server_rec *s) {
		ServerConfig *config = getServerConfig(s);
		
		try {
			applicationPool = applicationPoolServer->connect();
			applicationPoolServer->detach();
			applicationPool->setMax(config->maxPoolSize);
			applicationPool->setMaxPerApp(config->maxInstancesPerApp);
			applicationPool->setMaxIdleTime(config->poolIdleTime);
		} catch (const thread_interrupted &) {
			P_TRACE(3, "A system call was interrupted during initialization of "
				"an Apache child process. Apache is probably restarting or "
				"shutting down.");
		} catch (const exception &e) {
			P_WARN("Cannot initialize Passenger in an Apache child process: " <<
				e.what() <<
				" (this warning is harmless if you're currently restarting "
				"or shutting down Apache)\n");
			abort();
		}
	}