MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / initClient

Method initClient

src/jrd/ProfilerManager.cpp:956–981  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

954}
955
956void ProfilerIpc::initClient()
957{
958 // Shared memory mutex must be locked by caller
959
960 fb_assert(isServer == false);
961
962 const auto header = sharedMemory->getHeader();
963
964 // Here should not be event created by another alive client
965
966 if (header->clientEvent.event_pid)
967 {
968 fb_assert(header->clientEvent.event_pid != getpid());
969
970 if (header->clientEvent.event_pid != getpid())
971 {
972 if (ISC_check_process_existence(header->clientEvent.event_pid))
973 (Arg::Gds(isc_random) << "ProfilerIpc eventInit(clientEvent) failed").raise();
974 }
975
976 sharedMemory->eventFini(&header->clientEvent);
977 }
978
979 if (sharedMemory->eventInit(&header->clientEvent) != FB_SUCCESS)
980 (Arg::Gds(isc_random) << "ProfilerIpc eventInit(clientEvent) failed").raise();
981}
982
983
984//--------------------------------------

Callers

nothing calls this directly

Calls 6

GdsClass · 0.85
eventFiniMethod · 0.80
eventInitMethod · 0.80
getHeaderMethod · 0.45
raiseMethod · 0.45

Tested by

no test coverage detected