MCPcopy Create free account
hub / github.com/VirtualGL/virtualgl / safeExit

Function safeExit

server/faker.cpp:72–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70
71
72void safeExit(int retcode)
73{
74 bool shutdown;
75
76 globalMutex.lock(false);
77 shutdown = deadYet;
78 if(!deadYet)
79 {
80 deadYet = true;
81 cleanup();
82 fconfig_deleteinstance();
83 }
84 globalMutex.unlock(false);
85 if(!shutdown)
86 {
87 if(!strcasecmp(fconfig.exitfunction, "_exit"))
88 _exit(retcode);
89 else if(!strcasecmp(fconfig.exitfunction, "abort"))
90 abort();
91 else
92 exit(retcode);
93 }
94 else pthread_exit(0);
95}
96
97
98class GlobalCleanup

Callers 3

init3DFunction · 0.85
_vgl_dlopenFunction · 0.85
loadSymbolFunction · 0.85

Calls 4

cleanupFunction · 0.85
fconfig_deleteinstanceFunction · 0.85
lockMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected